Hello all, I am fairly new to c++ programming, and completely new to this forum. I am having a problem. This dll is supposed to display a dialog box with the words the person specefies in Game Maker 7.
Here is my file dllmain.cpp:
And here is my Game Maker scripts (I will try to explain as good as I can for people who don't use Game Maker 7)
/* Replace "dll.h" with the name of your header */
export const CHAR* Dialog(const CHAR* string1, const CHAR* string2)
global.Dialog is a variable defining the external function "Dialog" from the dll "WindowsDialog.dll".
global.Dialog = external_define("WindowsDialog.dll", "Dialog" ,dll_stdcall ,ty_real, 2, ty_string, ty_string);
dll_stdcall is the call type
ty_real is the resource type
2 is the number of arguments (caption and text)
ty_string and ty_string are the strings for caption and text
And here is the script show_dialog:
argument0 is the first parameter the user types when he calls the script for the caoption
external_call(global.Dialog, argument0, argument1);
so is argument1 for the text
And finally the code used to call it:
Initializes the dll
Shows the dialog with the caption 'Caption' and the text 'Text'.
Here is where the problem comes in. It works perfectly, and the gives me an error and I have to abort. Can anyone help me?