Dll Programming Resources
#281
Posted 05 July 2009 - 10:30 PM
-----------------------------------------------
None
#282
Posted 13 July 2009 - 07:01 PM
#283
Posted 24 September 2009 - 07:45 PM
#284
Posted 24 September 2009 - 08:07 PM
#286
Posted 13 December 2009 - 10:02 PM
#287
Posted 14 December 2009 - 02:45 PM
#288
Posted 14 December 2009 - 08:26 PM
You'd need the WinAPI documents, they are the functions you're looking for. As long as you know how to use them, you should be fine.Dose anyone know how to find all the functions for Pascal (make a message, play a sound...) I know the syntax, but dose pascal have a big help thing like GM that tells you all it can do ?
With a wrapper, yes.Is it possible C# DLL's to be defined by Game Maker?
#289
Posted 16 September 2010 - 03:30 PM
global.define_PAInit = external_define('PetAi.DLL','PAInit',dll_stdcall,ty_real,0);butit says error defining external function..thats function:
Function PAInit():real; stdcall; export;so what is the problem
Edited by _165591, 16 September 2010 - 03:30 PM.
#290
Posted 24 October 2010 - 03:28 PM
global.define_PAInit = external_define('PetAi.DLL', 'PAInit@0'
, dll_stdcall, ty_real, 0);I think I PM'd tangibleLime about this a while ago, but this tutorial doesn't work:Tutorials [ASM]
-----------------------------------------------
Assembly Tutorial
- Name: Assembly Tutorial
- URL: http://www.xs4all.nl...it/asm01001.htm
- Other Information: An in-depth guide to assesmbly programming.
- Submitted By: Unknown
1. Pages are missing
2. It talks only about 16-bit ASM, whereas Game Maker is 32-bit.
3. It doesn't mention anything about programming for Windows (vastly different to, for example, real mode programming)
4. It (of course) doesn't talk about DLLs in any way.
Edited by score_under, 24 October 2010 - 03:29 PM.
#291
Posted 25 October 2010 - 08:43 PM
It's strange, isn't it. This topic used to actually tell you about making DLLs in the language, now it tells you about the language.4. It (of course) doesn't talk about DLLs in any way.
#292
Posted 01 November 2010 - 07:20 PM
Add the DLL init function:
C++
bool APIENTRY DllMain(HANDLE hModule, DWORD dwReason, LPVOID lpReserved)
{
return TRUE;
}
#293
Posted 31 July 2011 - 11:19 PM
I got a few nasty surprises by calling this function, by the way. Putting it in a debug watch field or as a constant caused my OS to BSOD. I have no idea how that could happen just by reading a number out of a table, but there it is.
Edit: Then again, maybe it was caused by the room being empty. GM 8.1 has some weird bugs.
Edited by LSnK, 01 August 2011 - 06:06 PM.
#294
Posted 06 May 2012 - 12:06 AM
Has anyone used get_function_address() yet? I get that it gives you a function pointer, but I have no idea how to actually call into the runner from a DLL. Any tips? A usage example in C++ would be great.
I got a few nasty surprises by calling this function, by the way. Putting it in a debug watch field or as a constant caused my OS to BSOD. I have no idea how that could happen just by reading a number out of a table, but there it is.
Edit: Then again, maybe it was caused by the room being empty. GM 8.1 has some weird bugs.
Any news on this. Stumbled across this function and people here around say that it is a big step, yet there's none explaining how to use that at all...
A quick hint of it's usage in C# would be also nice...
Very much thanks in advance!
Edited by Drara, 06 May 2012 - 02:09 AM.
#295
Posted 06 January 2013 - 08:06 AM
Ha ha, i too was victim of that somedays , but i have successfully found a solution.Your problem looks like it is with a function in the SoundDLL.h file you included. I'm not exactly great with C++, but I think you're gonna need to post the code from SoundDLL.hOK so i tried to make a simple dll to play a sound
here is my code:#include "SoundDLL.h" #include <windows.h> #include <Mmsystem.h> export bool snd_play(const char* file_path,bool loop) { bool result; if (loop==true) { result=PlaySound(file_path,NULL,SND_FILENAME|SND_LOOP|SND_ASYNC); } else { result=PlaySound(file_path,NULL,SND_FILENAME|SND_ASYNC); } return result; }but when i try to compile i get this error[Linker error] undefined reference to `PlaySoundA@12' [Linker error] undefined reference to `PlaySoundA@12' ld returned 1 exit status C:\Dev-Cpp\Projects\SoundDLL\Makefile.win [Build Error] [SoundDLL.dll] Error 1Could some1 please help me :(/>
<edit>
Or...it might be the fact that you've got #include "SoundDLL.h"
Shouldn't it be #include <SoundDLL.h> ?
You need to add library called libwinmm.a in your project.
Edited by Nocturne, 13 January 2013 - 08:18 AM.
SPAM LINK REMOVED
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











