Saturday, March 23, 2013

Creating DLL with Visual Studio 2010 Express Edition

We can create DLL with one source file and one header file. Header file contains only the declaration of the functions exported from the DLL.

Header file: header.h is the name of the header file.
extern "C" __declspec(dllexport) returntype function1(argument);
extern "C" __declspec(dllexport) returntype function2(argument);

Source file source.cpp is the name of the source file this is the actual file containing the actual functionality of the exported functions.




#include<header.h> //include the header file containing the declaration of the exported functions in the dll
returntype function1(arguments)
{
write your code here
return statement
}

returntype function2(arguments)
{
write your code here
return
}



DC motor control with Pulse Width Modulation Part 1

DC Motor intro DC motor is a device which converts electrical energy into kinetic energy. It converts the DC power into movement. The typica...