Hi erveryone,
I'm a new member of this great forum and hope to find nice people
Hmm... I can say more about me first, if you would like.
My name is Jérôme, is 20 years old, born and live in Strasbourg (North-East France) and got used to create C/C++ statements for plugin for Messenger Plus! older versions.
I would like to extend the limited functions provided by JScript in adding an external library (.dll) to provide new powerful features.
But when calling Interop.Call(), the debugging window tell me that an unknown error has occured.
Here is a part of the C/C++ code in the DLL file :
test.h header file
code:
#ifndef _TEST_H_
#define _TEST_H_
#ifndef _UNICODE
#define _UNICODE
#endif
#define DLLEXPORT __declspec(dllexport)
extern "C++" {
// API test
int __stdcall DLLEXPORT CreateTest(TCHAR* szMessage);
} // end extern C++
#endif
Now, the C++ source file
code:
#include <windows.h>
#include "test.h"
extern "C++" {
// API test
int __stdcall DLLEXPORT CreateTest(TCHAR* szMessage) {
MessageBox(NULL, "", "", 0);
MessageBox(NULL, szMessage, TEXT(""), MB_ICONHAND | MB_OK);
return 1;
}
} // end extern C++
And a part of my script file :
code:
Interop.Call("xmsn32.dll", "CreateTest", Message);
Debug.Trace("Test created - " + Message);
FreeDll("xmsn32.dll");
I've a copy/paste the dll file into Windows system directory and know that the script has found and load it.
But an unkown error occured when calling Interop.Call()...
Has someone an idea ?
I thank you all in advance for your help
Cheers,
S4KurA_^
PS : Sorry for by english, but I try to do my best