Click here to Skip to main content
16,005,437 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Reading a bitmap file Pin
Alexander M.,22-Mar-04 3:27
Alexander M.,22-Mar-04 3:27 
GeneralRe: Reading a bitmap file Pin
John R. Shaw22-Mar-04 21:37
John R. Shaw22-Mar-04 21:37 
GeneralAssertion Pin
21-Mar-04 22:33
suss21-Mar-04 22:33 
GeneralRe: Assertion Pin
Prakash Nadar21-Mar-04 23:12
Prakash Nadar21-Mar-04 23:12 
General24 bit bitmap VC++ .NET Pin
SinnFein21-Mar-04 22:25
SinnFein21-Mar-04 22:25 
GeneralRe: 24 bit bitmap VC++ .NET Pin
SinnFein21-Mar-04 23:18
SinnFein21-Mar-04 23:18 
GeneralRe: 24 bit bitmap VC++ .NET Pin
John R. Shaw22-Mar-04 21:58
John R. Shaw22-Mar-04 21:58 
GeneralHelp about using Dll's Functions Pin
JeabJB21-Mar-04 22:15
JeabJB21-Mar-04 22:15 
I have a question concerning the use of a function defined in a Dll file.
I don't know precisely how to call a function defined in a Dll file.

I follow what MSDN specified but it doesn't work for the functions which take arguments. Here is the syntax I use to call the function "USB_WriteFile" defined in my Dll "XtlUsb.dll":


typedef BOOL (CALLBACK* USB_WriteFile)(PVOID,DWORD,LPDWORD,ULONG);

HINSTANCE hDLL;
hDLL = LoadLibrary("XtlUsb.dll");
USB_WriteFile pUSB_WriteFile;

PVOID lpBuffer = 0;
DWORD nNumberOfBytesToWrite = 0;
LPDWORD lpNumberOfBytesWritten = 0;
ULONG Timeout = Timeout;

if (hDLL != NULL)
{
pUSB_WriteFile = (USB_WriteFile)GetProcAddress(hDLL,"USB_WriteFile");
if (!pUSB_WriteFile)
{
FreeLibrary(hDLL);
return FALSE;
}
else
{
BOOL BResult = TRUE;
BResult = pUSB_WriteFile(lpBuffer,nNumberOfBytesToWrite,lpNumberOfBytesWritten,Timeout);
}
}

I have a fatal error coming from Visual C++ when arriving at the line "BResult = pUSB_WriteFile(lpBuffer,nNumberOfBytesToWrite,lpNumberOfBytesWritten,Timeout);"

Do you have any explanations?
Thank's for advance.
GeneralRe: Help about using Dll's Functions Pin
Steve S21-Mar-04 22:38
Steve S21-Mar-04 22:38 
GeneralRe: Help about using Dll's Functions Pin
JeabJB21-Mar-04 22:45
JeabJB21-Mar-04 22:45 
GeneralRe: Help about using Dll's Functions Pin
Steve S22-Mar-04 1:26
Steve S22-Mar-04 1:26 
GeneralHelp about using Dll's Functions Pin
Jeab.21-Mar-04 22:15
sussJeab.21-Mar-04 22:15 
GeneralRe: Help about using Dll's Functions Pin
Alexander M.,22-Mar-04 3:16
Alexander M.,22-Mar-04 3:16 
GeneralRe: Help about using Dll's Functions Pin
JeabJB22-Mar-04 4:07
JeabJB22-Mar-04 4:07 
QuestionWhy not connect bitmap with button? Pin
vividtang21-Mar-04 21:23
vividtang21-Mar-04 21:23 
AnswerRe: Why not connect bitmap with button? Pin
Branislav22-Mar-04 2:33
Branislav22-Mar-04 2:33 
Generalhash table useful for hooking procedure Pin
name_or_alias21-Mar-04 21:20
name_or_alias21-Mar-04 21:20 
Generalusing vectors - begin method Pin
Ming Yan21-Mar-04 20:30
Ming Yan21-Mar-04 20:30 
GeneralRe: using vectors - begin method Pin
jhwurmbach21-Mar-04 22:09
jhwurmbach21-Mar-04 22:09 
GeneralRe: using vectors - begin method Pin
Maxwell Chen21-Mar-04 22:45
Maxwell Chen21-Mar-04 22:45 
GeneralRe: using vectors - begin method Pin
jhwurmbach21-Mar-04 23:01
jhwurmbach21-Mar-04 23:01 
GeneralRe: using vectors - begin method Pin
Maxwell Chen22-Mar-04 15:31
Maxwell Chen22-Mar-04 15:31 
GeneralRe: using vectors - begin method Pin
jhwurmbach22-Mar-04 21:08
jhwurmbach22-Mar-04 21:08 
GeneralRe: using vectors - begin method Pin
Roger Allen22-Mar-04 5:12
Roger Allen22-Mar-04 5:12 
Generalnewbie question about vc++ and dlls Pin
charlener21-Mar-04 19:38
charlener21-Mar-04 19:38 

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.