Click here to Skip to main content
15,890,438 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
AnswerRe: Accessing DLL Pin
Mark Salsbery26-Feb-07 7:41
Mark Salsbery26-Feb-07 7:41 
vinith wrote:
Could someone give me a hint regarding what could have went worng.


You are passing a pointer to a buffer that is only 2 characters long, yet you pass 32 as it's
length. Chances are pretty good the function is trying to overrun the end of your buffer.

Also the second parameter is expecting a pointer to a DWORD. "LPDWORD uParam2=(LPDWORD)32;"
creates a pointer to address 32 which is invalid.

Either of the above two problems will most likely cause an access violation.

Try:

TCHAR szParam1[32]={0};
DWORD uParam2 = 32;
...
uReturnVal = lpfnDllFunc1(szParam1, &uParam2);

*EDIT* Actually you are forcing the call to the non-Unicode API so it should be:

char szParam1[32]={0};
DWORD uParam2 = 32;
...
uReturnVal = lpfnDllFunc1(szParam1, &uParam2);

Mark








"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")

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 
Questionobjective c Pin
deeps_cute26-Feb-07 2:46
deeps_cute26-Feb-07 2:46 

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.