Click here to Skip to main content
15,888,590 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: about the dll and lib Pin
ThatsAlok1-Apr-09 19:01
ThatsAlok1-Apr-09 19:01 
GeneralRe: about the dll and lib Pin
Nathan Holt at EMOM12-Mar-08 5:40
Nathan Holt at EMOM12-Mar-08 5:40 
GeneralSerialization Pin
neha.agarwal2712-Mar-08 1:03
neha.agarwal2712-Mar-08 1:03 
GeneralRe: Serialization Pin
Rajkumar R12-Mar-08 2:21
Rajkumar R12-Mar-08 2:21 
Questioncan anybody help me in creating dll Pin
Deepu Antony12-Mar-08 0:41
Deepu Antony12-Mar-08 0:41 
AnswerRe: can anybody help me in creating dll Pin
Iain Clarke, Warrior Programmer12-Mar-08 1:26
Iain Clarke, Warrior Programmer12-Mar-08 1:26 
GeneralRe: can anybody help me in creating dll Pin
Rajesh R Subramanian12-Mar-08 1:49
professionalRajesh R Subramanian12-Mar-08 1:49 
GeneralRe: can anybody help me in creating dll Pin
Deepu Antony12-Mar-08 4:16
Deepu Antony12-Mar-08 4:16 
sorry that was a mistake occured while typing this is the exact code and i have commented where the error is occuring
actually the return value was a mistake occured while type.... ill send you the sample code of how i tried to create the dll..it is as follows

//MY APPLICATION FILE
//----------------------------------------------
#include <windows.h>

typedef UINT (CALLBACK* LPFNDLLFUNC1)(VOID);
typedef UINT (CALLBACK* LPFNDLLFUNC2)(LPCSTR);

HINSTANCE hDLL;
LPFNDLLFUNC1 MyFunc1;
LPFNDLLFUNC2 MyFunc2;
UINT uReturnVal;

int main() {

hDLL = LoadLibrary("C:\\sample1.dll");

if (hDLL != NULL)
{
MyFunc1 = (LPFNDLLFUNC1)GetProcAddress(hDLL,"MyDLLFunc1");
MyFunc2 = (LPFNDLLFUNC2)GetProcAddress(hDLL,"MyDLLFunc2");

if (!MyFunc1 || !MyFunc2)
{
//Show error message
FreeLibrary(hDLL);
return false;
}
else
{
uReturnVal = MyFunc1();
uReturnVal = MyFunc2("HELLO WORLD!");//GETTING AN EXCEPTION HERE…..IT IS CALLING THE FUNCTION IN THE DLL BUT AFTER THAT THE EXCEPTION OCCURS
}
}

return true;
}

//----------------------------------------------------------------
//MY DLL CREATION FILE
//-----------------------------------------------------------------------
// sample1.cpp : Defines the entry point for the DLL application.
//

#include "stdafx.h"

BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}

int MyDLLFunc1() {
MessageBox(NULL,"My DLL Function 1","",MB_OK);

return true;
}

int MyDLLFunc2(char *TEXT) {
MessageBox(NULL,TEXT,"",MB_OK);

return true;
}
//------------------------------------------------------------------------
//MY DEFINITION FILE
//------------------------------------------------------------------------
LIBRARY sample1
DESCRIPTION This is my DLL file!

EXPORTS
MyDLLFunc1 @1
MyDLLFunc2 @2



//comments
//the error is generating after this line uReturnVal = MyFunc2("HELLO WORLD!");
can you help me out
AnswerRe: can anybody help me in creating dll Pin
David Crow12-Mar-08 2:39
David Crow12-Mar-08 2:39 
GeneralRe: can anybody help me in creating dll Pin
Deepu Antony12-Mar-08 3:38
Deepu Antony12-Mar-08 3:38 
AnswerRe: can anybody help me in creating dll Pin
Rajkumar R12-Mar-08 4:19
Rajkumar R12-Mar-08 4:19 
GeneralRe: can anybody help me in creating dll Pin
Ernest Laurentin12-Mar-08 4:46
Ernest Laurentin12-Mar-08 4:46 
GeneralTransparent Value over the screen Pin
Chandrasekharan P12-Mar-08 0:39
Chandrasekharan P12-Mar-08 0:39 
GeneralRe: Transparent Value over the screen Pin
chandu00412-Mar-08 1:44
chandu00412-Mar-08 1:44 
GeneralMapping co-ordinates Pin
Gita.Bairavi12-Mar-08 0:36
Gita.Bairavi12-Mar-08 0:36 
GeneralRe: Mapping co-ordinates Pin
Mark Salsbery12-Mar-08 5:27
Mark Salsbery12-Mar-08 5:27 
GeneralRe: Mapping co-ordinates Pin
Gita.Bairavi13-Mar-08 19:32
Gita.Bairavi13-Mar-08 19:32 
GeneralRe: Mapping co-ordinates Pin
Mark Salsbery13-Mar-08 19:49
Mark Salsbery13-Mar-08 19:49 
QuestionHow to speed up Ultimate Grid with 8000 rows ? Pin
Anna Anna12-Mar-08 0:19
Anna Anna12-Mar-08 0:19 
AnswerRe: How to speed up Ultimate Grid with 8000 rows ? Pin
Rajesh R Subramanian12-Mar-08 0:42
professionalRajesh R Subramanian12-Mar-08 0:42 
GeneralRe: How to speed up Ultimate Grid with 8000 rows ? Pin
Anna Anna12-Mar-08 1:13
Anna Anna12-Mar-08 1:13 
AnswerRe: How to speed up Ultimate Grid with 8000 rows ? Pin
David Crow12-Mar-08 2:41
David Crow12-Mar-08 2:41 
AnswerRe: How to speed up Ultimate Grid with 8000 rows ? Pin
Anna Anna12-Mar-08 2:53
Anna Anna12-Mar-08 2:53 
QuestionRe: How to speed up Ultimate Grid with 8000 rows ? Pin
David Crow12-Mar-08 3:04
David Crow12-Mar-08 3:04 
AnswerRe: How to speed up Ultimate Grid with 8000 rows ? Pin
Anna Anna12-Mar-08 3:17
Anna Anna12-Mar-08 3:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.