Discussion
Topics
Last Day
Last Week
Tree View

Search
New Messages
Keyword Search

Help
Getting Started
Formatting
Troubleshooting
Program Credits

Utilities
Edit Profile
Administration
Contact

 
forum - discussion board
- about - downloads - registration - forum - misc - home - © 1996-99 GWD Text Editor

Calling DLL functions?

GWD Text Editor Forum: Technical Support: Calling DLL functions?
Top of pagePrevious messageNext messageBottom of pageLink to this message  By Abdullah Bushnaq on Monday, June 14, 2004 - 11:10 pm:

Has anybody been successful calling a DLL from a script?

I tried using the example provided with GWD documentation to launch IE but I got an error message about a missing "(".

Anybody with better luck doing this?


Top of pagePrevious messageNext messageBottom of pageLink to this message  By Vedran Gaco (Vgaco) on Thursday, June 17, 2004 - 01:58 am:

Add comma at the end of the line:

"ippppi", hwnd, lpszOp, lpszFile, lpszParams


it should be

"ippppi", hwnd, lpszOp, lpszFile, lpszParams,

instead of

"ippppi", hwnd, lpszOp, lpszFile, lpszParams


Top of pagePrevious messageNext messageBottom of pageLink to this message  By Abdullah Bushnaq on Monday, August 16, 2004 - 04:47 pm:

The example works and that specific DLL launched correctly.

Now I am trying to call a DLL that accepts three char * variables to do searches and return the results to GWD. However, GWD is blowing up. I think I am setting up the calls correctly, but not sure if the CallDLLFunc is liking the inputs.

Thoughts?


#include
#include

int _SearchCoolCopy(char *filename, char *WorkingDir, char *result)
{
int nErr;
int nRet;

MsgBox(filename, MB_OK);
MsgBox(WorkingDir, MB_OK);
MsgBox(result, MB_OK);
nRet = (int)CallDLLFunc(&nErr, "CoolUtil.dll", "GetCoolFilePath","ppp", filename, WorkingDir, result);

if(nErr)
{
switch(nErr)
{
case -1: MsgBox("Wrong parameters", MB_OK); break;
case -2: MsgBox("Error loading CoolUtil.dll", MB_OK); break;
case -3: MsgBox("GetCoolFilePath function does not exist", MB_OK); break;
default: MsgBox("Unknown error", MB_OK);
}
}
else
{
//success calling DLL
MsgBox("Null result from calling GetCoolFilePath successfully", MB_OK);
}
return nRet;
}

void _DummyFunction(void)
{
int nErr;

(int)CallDLLFunc(&nErr, "CoolUtil.dll", "DummyFunction","");

if(nErr)
{
switch(nErr)
{
case -1: MsgBox("Wrong parameters", MB_OK); break;
case -2: MsgBox("Error loading CoolUtil.dll", MB_OK); break;
case -3: MsgBox("DummyFunction function does not exist", MB_OK); break;
default: MsgBox("Unknown error", MB_OK);
}
}
else
{
//success calling DLL
MsgBox("Null result from calling DummyFunction successfully", MB_OK);
}
}


int main(void)
{
char *filename = "test.txt^#92;0";
char *WorkingDir = "C:^#92;^#92;^#92;0";
char *result;

result = (char *) malloc(256);

_SearchCoolCopy(filename, WorkingDir, result);
_DummyFunction();

return 0;
}


Add a Message


This is a public posting area. If you do not have an account, enter your full name into the "Username" box and leave the "Password" box empty. Your e-mail address is optional.
Username:  
Password:
E-mail:


- about - downloads - registration - forum - misc - home - © 1996-99 GWD Text Editor