Click here to Skip to main content
15,902,938 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Conversion of Unsigned __int64 to binary does not work in 2003 Pin
Mark Salsbery26-Feb-07 9:19
Mark Salsbery26-Feb-07 9:19 
GeneralRe: Conversion of Unsigned __int64 to binary does not work in 2003 Pin
AAKAra26-Feb-07 10:00
AAKAra26-Feb-07 10:00 
QuestionHandle Reuse Problems? [modified] Pin
V3RO26-Feb-07 7:50
V3RO26-Feb-07 7:50 
AnswerRe: Handle Reuse Problems? Pin
Mark Salsbery26-Feb-07 9:08
Mark Salsbery26-Feb-07 9:08 
GeneralRe: Handle Reuse Problems? Pin
V3RO26-Feb-07 9:15
V3RO26-Feb-07 9:15 
GeneralRe: Handle Reuse Problems? Pin
V3RO26-Feb-07 9:45
V3RO26-Feb-07 9:45 
GeneralRe: Handle Reuse Problems? Pin
Mark Salsbery26-Feb-07 10:16
Mark Salsbery26-Feb-07 10:16 
QuestionAccessing DLL Pin
vinith26-Feb-07 7:28
vinith26-Feb-07 7:28 
I am trying to access a dll from vc++ code using the below code.

typedef BOOL (CALLBACK* GetUserNameA)(LPTSTR,LPDWORD);
HINSTANCE hDLL; // Handle to DLL
GetUserNameA lpfnDllFunc1; // Function pointer
LPTSTR dwParam1=(LPTSTR)" ";
LPDWORD uParam2=(LPDWORD)32;
BOOL uReturnVal;

hDLL = LoadLibrary("F:\\DLL\\advapi32\\advapi32.dll");
if (hDLL != NULL)
{
lpfnDllFunc1 = (GetUserNameA)GetProcAddress(hDLL,
"GetUserNameA");
if (!lpfnDllFunc1)
{
// handle the error
FreeLibrary(hDLL);
//return SOME_ERROR_CODE;
}
else
{
// call the function
uReturnVal = lpfnDllFunc1(dwParam1, uParam2);
}
}

But when i call the function as uReturnVal = lpfnDllFunc1(dwParam1, uParam2);
I get an access violation error. Could someone give me a hint regarding what could have went worng.

Vin
AnswerRe: Accessing DLL Pin
Mark Salsbery26-Feb-07 7:41
Mark Salsbery26-Feb-07 7:41 
GeneralRe: Accessing DLL Pin
vinith26-Feb-07 23:03
vinith26-Feb-07 23:03 
QuestionRe: Accessing DLL Pin
prasad_som26-Feb-07 19:48
prasad_som26-Feb-07 19:48 
QuestionMS Access Pin
shiraztk26-Feb-07 6:32
shiraztk26-Feb-07 6:32 
QuestionRe: MS Access Pin
David Crow26-Feb-07 9:04
David Crow26-Feb-07 9:04 
QuestionWhite space increased and one reference number jumped in simple console application Pin
Software_Specialist26-Feb-07 4:31
Software_Specialist26-Feb-07 4:31 
QuestionRe: White space increased and one reference number jumped in simple console application Pin
Newbie0026-Feb-07 6:24
Newbie0026-Feb-07 6:24 
AnswerRe: White space increased and one reference number jumped in simple console application Pin
Software_Specialist27-Feb-07 9:38
Software_Specialist27-Feb-07 9:38 
GeneralRe: White space increased and one reference number jumped in simple console application Pin
Newbie0028-Feb-07 3:28
Newbie0028-Feb-07 3:28 
QuestionMS Access ActiveX VC++ Pin
shiraztk26-Feb-07 3:58
shiraztk26-Feb-07 3:58 
AnswerRe: MS Access ActiveX VC++ Pin
James R. Twine26-Feb-07 4:16
James R. Twine26-Feb-07 4:16 
GeneralRe: MS Access ActiveX VC++ Pin
shiraztk26-Feb-07 4:35
shiraztk26-Feb-07 4:35 
QuestionVisual Studio Just-In-Time Debugger Pin
Try26-Feb-07 3:12
Try26-Feb-07 3:12 
AnswerRe: Visual Studio Just-In-Time Debugger Pin
James R. Twine26-Feb-07 3:18
James R. Twine26-Feb-07 3:18 
AnswerRe: Visual Studio Just-In-Time Debugger Pin
Cedric Moonen26-Feb-07 3:19
Cedric Moonen26-Feb-07 3:19 
GeneralRe: Visual Studio Just-In-Time Debugger Pin
Try26-Feb-07 3:26
Try26-Feb-07 3:26 
GeneralRe: Visual Studio Just-In-Time Debugger Pin
James R. Twine26-Feb-07 4:14
James R. Twine26-Feb-07 4:14 

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.