I have a simple question, im trying to access a dll called
'runtest.dll', with a routine with the header:
void RunTest(LPVOID lpData, int nDataLen, LPSTR szstrResult, int
Currently my code, gives me an access violation writing with a memory
address. The point of runtest.dll is to accept data from a file
(lpData), and return (in szstrResult) a string created from the data
(which is binary data). Sound simple enough? My code is below, any
help is greatly appreciated. Thanks in advance.
typedef VOID (*MYPROC)(LPVOID, int, LPSTR, int);
void passFile(LPCSTR fileName)
testLib = LoadLibrary("runtest.dll");
procTest = (MYPROC) GetProcAddress(testLib,"RunTest");
hFile = CreateFile(fileName, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
ReadFile(hFile, buf, sizeof(DWORD)*256,&dwNumRead,NULL);
Re: Newbie Question
LPVOID, LPSTR, HINSTANCE, DWORD ...
try a Microsoft newsgroup.
|All times are GMT. The time now is 01:54 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.