Hi,
To get straight to the point: I'm new at C++. I have quite some programming experience, mainly in GML [Game Maker Language], PHP and Visual Basic. I use GML frequently, almost everyday. But it's problem is, it does not have a lot of functions. But you can use a DLL, which has a lot more functions. That's why I would really like to learn C++. To start off I thought I could make a simple audio DLL. To load and play audio files. I've read some tutorials before trying this, but I still have some questions. GML and PHP have an easy-to-understand help, but the MSDN is too difficult to understand for me [partly because I'm Dutch]. But anyway, so far I've got this header file:
#ifndef _DLL_H_
#define _DLL_H_
#define export extern "C" __declspec (dllexport)
#endif
This is just copied from an example, so I don't know exactly what it means. The only thing I actually know is that the word 'export' is defined.
Now a personal problem comes in: I tend to don't understand it if something isn't clear. So I hoped you could explain the rest as I could not find a clear explanation.
This is the source for the DLL I made:
#include <windows.h>
#include <string.h>
export double sound_load(char *filename, double loop)
{
PlaySound("play "+filename,
I know a bit more from this code: '#include' means that a list of functions is included [a library it's called I believe]. 'export' means that the output of the function is given to the calling thing. Furthermore 'double' means a variable of type double is returned by the function and the things between brackets are the arguments and what type they are.
As I said before, I don't get a thing at what they say at MSDN, so I was hoping someone could clearly explain what PlaySound needs [which and what type of arguments].
Btw, it's quite annoying, GML only uses char *s and doubles so could anyone explain to me what a char * is? I know it points to a variable in the memory which points to another one and that variable's value is used.
Ragoune