The Game Creators
The Game Creators Home Online Shop Click to Login
  Hot: Christmas CompetitionNovember NewsletterModel Pack 36DB Pro Pack 2009DGS BonanzaCharacter PackFPS Creator Bonanza;
The Game Creators
Programming Talk / C++ / C# - C++ Tutorial - How to create a DarkBASIC Professional plugin in Dev-C++

Go to the first page of this board Return to the Forum Menu Post Message
56 Messages - Page   of 2   
Bookmark and Share Search the Forum Next 40

Author Message
Aaron Miller

User


Joined: Sat Feb 25th 2006
Location: Behind the trusty dumpster.
Posted: 21st Jun 2007 22:09     Edited: 13th Sep 2007 02:16     | link | toggle

Tutorial is now here.


Cheers,

-naota

DBP, $80. DBP's plugins, $320. Watching DBP Crash, Priceless.
NG Website Aex.Uni forums
Back to top
Aex.Uni Send AIM user a message
Download: logo_alpha.png Size: 15375 bytes  View Image: logo_alpha.png Size: 15375 bytesReport this message as abusive
Kieran

User


Joined: Sun Aug 6th 2006
Location: Hamilton, New Zealand
Posted: 22nd Jun 2007 20:43           | link | toggle

this is really helpful DB, thanks im sure it will benefit alot of members on this forum and maybe we will see some nice plug-ins around from it too

thanks, Kieran

Back to top
Report this message as abusive
Aaron Miller

User


Joined: Sat Feb 25th 2006
Location: Behind the trusty dumpster.
Posted: 22nd Jun 2007 23:25           | link | toggle

Thanks Kieran. I did spend a long time on it, would be a shame for it to go to waste. ^_^


Cheers,

-naota

Back to top
Aex.Uni Send AIM user a message
Report this message as abusive
Mistrel

PureGDK Moderator


Joined: Wed Nov 9th 2005
Location: Cyberspace
Posted: 27th Jun 2007 02:02     Edited: 27th Jun 2007 02:17     | link | toggle

I get several compile errors when trying to compile the HelloWorld example.

+ Code Snippet
Compiler: Default compiler
Building Makefile: "C:Dev-CppExamplesDBPPlugin_HelloWorldMakefile.win"
Executing  make clean
rm -f main.o  DBPPlugin_HelloWorld.dll

g++.exe -c main.cpp -o main.o -I"lib/gcc/mingw32/3.4.2/include"  -I"include/c++/3.4.2/backward"  -I"include/c++/3.4.2/mingw32"  -I"include/c++/3.4.2"  -I"include"  -DBUILDING_DLL=1   

In file included from C:/Dev-Cpp/Bin/../lib/gcc/mingw32/3.4.2/../../../../include/DBPPluginDBPPluginTemplate.h:31,
                 from header.h:3,
                 from main.cpp:2:
C:/Dev-Cpp/Bin/../lib/gcc/mingw32/3.4.2/../../../../include/DBPPlugin/DBPGlobStruct.h:17:20: dxdiag.h: No such file or directory
C:/Dev-Cpp/Bin/../lib/gcc/mingw32/3.4.2/../../../../include/DBPPlugin/DBPGlobStruct.h:18:22: D3dx9tex.h: No such file or directory
In file included from C:/Dev-Cpp/Bin/../lib/gcc/mingw32/3.4.2/../../../../include/DBPPluginDBPPluginTemplate.h:31,
                 from header.h:3,
                 from main.cpp:2:
C:/Dev-Cpp/Bin/../lib/gcc/mingw32/3.4.2/../../../../include/DBPPlugin/DBPGlobStruct.h:234: error: `LPDIRECT3DTEXTURE9' does not name a type
C:/Dev-Cpp/Bin/../lib/gcc/mingw32/3.4.2/../../../../include/DBPPlugin/DBPGlobStruct.h:235: error: `LPDIRECT3DSURFACE9' does not name a type
C:/Dev-Cpp/Bin/../lib/gcc/mingw32/3.4.2/../../../../include/DBPPlugin/DBPGlobStruct.h:236: error: `LPDIRECT3DSURFACE9' does not name a type
C:/Dev-Cpp/Bin/../lib/gcc/mingw32/3.4.2/../../../../include/DBPPlugin/DBPGlobStruct.h:237: error: `LPDIRECT3DSURFACE9' does not name a type

make.exe: *** [main.o] Error 1

Execution terminated


Gamers found a solution for this by installing some sort of DirectX SDK for Dev-cpp.

http://3dfolio.com
Back to top
http://puregdk.com Send AIM user a message
Report this message as abusive
Aaron Miller

User


Joined: Sat Feb 25th 2006
Location: Behind the trusty dumpster.
Posted: 27th Jun 2007 03:46           | link | toggle

Yeah the DirectX SDK is required for GlobStruct or the DirectX commands to be used.

Cheers,

-naota

Back to top
Aex.Uni Send AIM user a message
Report this message as abusive
SunDawg

User


Joined: Tue Dec 21st 2004
Location: Massachusetts
Posted: 1st Jul 2007 21:07     Edited: 1st Jul 2007 21:10     | link | toggle

Instead of using the DirectX stuff, you could instead define those two types like so:
+ Code Snippet
#define LPDIRECT3DTEXTURE9 void*
#define LPDIRECT3DSURFACE9 void*

and then comment out #include "D3dx9tex.h"
+ Code Snippet
//#include "D3dx9tex.h" (File Missing)

Note the note on the end, reminding you that that DirectX stuff has be disabled. I like this fix better, because it's quick, and doesn't take any extra installation, giving you a smaller DLL size if you don't use those two types.

EDIT: By the way, "DB user 2006+", would that '-naota' happen to be an FLCL reference?

http://www.funk.us.tt/
Back to top
Funkentstört Send AIM user a message
Report this message as abusive
Benny53

User


Joined: Sun Dec 25th 2005
Location: Ohio
Posted: 1st Jul 2007 21:55           | link | toggle

haha,FLCL is insane as hell man. That confused me sooooo much,hahaha. One of my favorite shows though. Now back to being on topic, this looks pretty nice. If I didn't have a program to get the dbp functions from the dlls in like,less than 10 seconds,I'd use this. This will help many people

Hello
Back to top
Send AIM user a message
Report this message as abusive
Aaron Miller

User


Joined: Sat Feb 25th 2006
Location: Behind the trusty dumpster.
Posted: 1st Jul 2007 23:44           | link | toggle

@Benny53
Hells ya FLCL is awsome! One of my favorite shows too. ^^

@SunDawg
I'll implement something similiar later on. And yes. Naota is an FLCL reference ^_^


Cheers,

-naota

Back to top
Aex.Uni Send AIM user a message
Report this message as abusive
DrDunc

User


Joined: Wed Nov 2nd 2005
Location: MemBlock 12 (alt. file Thinking12.mem)
Posted: 2nd Jul 2007 20:48           | link | toggle

This looks good, you have spent some time on it!
I've been looking for something like this for some time but to no avail...
Can't wait to have a good test with it. Will have to brush up my C++ though.
Well done and keep up the good work!
Back to top
Report this message as abusive
MaRo

User


Joined: Sun Jan 1st 2006
Location: Central Europe
Posted: 3rd Jul 2007 02:43           | link | toggle

Thanks, this will definitely come in handy
Back to top
MaroSoftware
Report this message as abusive
Aaron Miller

User


Joined: Sat Feb 25th 2006
Location: Behind the trusty dumpster.
Posted: 3rd Jul 2007 03:06           | link | toggle

@DrDunc
Thanks. I have spent quite some time on it, yes. But it was worth it.

@MaRo
Thank you.


Cheers,

-naota

Back to top
Aex.Uni Send AIM user a message
Report this message as abusive
Gamefreak

User


Joined: Sun Jun 20th 2004
Location: Cyberspace
Posted: 3rd Jul 2007 09:35           | link | toggle

I'm having trouble getting the examples (and the tutorial to work)

-I downloaded and installed Dev C++ 4.9.8
-I downloaded and installed the DirectX package for Dev C++
-I downloaded and installed your plugin
-I opened the spinning cube project and did a Rebuild All
-I copied the dll into the user plugins folder
-I opened the DBPro spinning cube project and hit compile, it didn't recognize the command
Back to top
Report this message as abusive
Foe7

User


Joined: Mon Mar 26th 2007
Location: Cyberspace
Posted: 3rd Jul 2007 14:48           | link | toggle

I am unable to get the above to compile, just like I am unable to get the 3D cube example to compile.

When I try and get the above to compile, I get:

+ Code Snippet
Compiler: Default compiler
Building Makefile: "C:\Users\Me\Desktop\PluginDev3\Results\Makefile.win"
Executing  make clean
rm -f main.o DBPDLLTEST_private.res DBPDLLTEST.dll

g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"  -DBUILDING_DLL=1   

windres.exe -i DBPDLLTEST_private.rc --input-format=rc -o DBPDLLTEST_private.res -O coff 

gcc: installation problem, cannot exec `cc1': No such file or directory

windres.exe: no resources

make.exe: *** [DBPDLLTEST_private.res] Error 1

Execution terminated


and for the 3D cube:

+ Code Snippet
Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Examples\DBPPlugin_HelloWorld\Makefile.win"
Executing  make clean
rm -f main.o  DBPPlugin_HelloWorld.dll

g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"  -DBUILDING_DLL=1   

dllwrap.exe --output-def libDBPPlugin_HelloWorld.def --driver-name c++ --implib libDBPPlugin_HelloWorld.a main.o  -L"C:/Dev-Cpp/lib" -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -ldinput -lddraw -ldxguid -lwinmm    -o DBPPlugin_HelloWorld.dll

ld: dllcrt2.o: No such file: No such file or directory

dllwrap.exe: no export definition file provided.
Creating one, but that may not be what you want
dllwrap.exe: c++ exited with status 1

make.exe: *** [DBPPlugin_HelloWorld.dll] Error 1

Execution terminated
Back to top
Report this message as abusive
Aaron Miller

User


Joined: Sat Feb 25th 2006
Location: Behind the trusty dumpster.
Posted: 3rd Jul 2007 16:01           | link | toggle

@Gamefreak & Foe7
Windows XP or Vista?


Cheers,

-naota

Back to top
Aex.Uni Send AIM user a message
Report this message as abusive
Gamefreak

User


Joined: Sun Jun 20th 2004
Location: Cyberspace
Posted: 3rd Jul 2007 18:59           | link | toggle

Windows XP
Back to top
Report this message as abusive
Aaron Miller

User


Joined: Sat Feb 25th 2006
Location: Behind the trusty dumpster.
Posted: 3rd Jul 2007 20:55           | link | toggle

@Gamefreak
I can't really suggest anything for your problem then. Do not use spaces in your project name, and contact GatorHex (Who was able to successfully compile, despite having the same problems).

Hope that at least somewhat helps.


Cheers,

-naota

Back to top
Aex.Uni Send AIM user a message
Report this message as abusive
Foe7

User


Joined: Mon Mar 26th 2007
Location: Cyberspace
Posted: 4th Jul 2007 02:58           | link | toggle

Vista, but i really hope that doesn't mean that this won't work :c

-F7
Back to top
Report this message as abusive
Aaron Miller

User


Joined: Sat Feb 25th 2006
Location: Behind the trusty dumpster.
Posted: 4th Jul 2007 03:19           | link | toggle

@Foe7
Some of my friends have experienced problems with Vista and Dev-C++... Apparently Dev-C++ was trying to look for files on the desktop, and at random other folders. The solution was to use XP for one friend, and the other, I'm not sure what his solution was. Seek out Benoj, he will help you.


Cheers,

-naota

Back to top
Aex.Uni Send AIM user a message
Report this message as abusive
Turoid

User


Joined: Sat Nov 1st 2003
Location: The Netherlands
Posted: 4th Jul 2007 09:55           | link | toggle

Very nice tutorial, I'm going to play with it when I get home darn work...

I am awesome and always right.
Back to top
Report this message as abusive
Aaron Miller

User


Joined: Sat Feb 25th 2006
Location: Behind the trusty dumpster.
Posted: 5th Jul 2007 01:12           | link | toggle

@Turoid
Cool. Let me know how that goes. ^_^


Cheers,

-naota

Back to top
Aex.Uni Send AIM user a message
Report this message as abusive
Google Ad
Back to top
 
Silvester

User


Joined: Wed Dec 7th 2005
Location: Netherlands
Posted: 9th Jul 2007 04:32           | link | toggle

When compiling it gives me about 13 errors,some compiling issues,and some of files not exising...

Back to top
DaMoose
Report this message as abusive
Aaron Miller

User


Joined: Sat Feb 25th 2006
Location: Behind the trusty dumpster.
Posted: 9th Jul 2007 22:54           | link | toggle

@PoD
Can you please tell me the errors?


Cheers,

-naota

Back to top
Aex.Uni Send AIM user a message
Report this message as abusive
Silvester

User


Joined: Wed Dec 7th 2005
Location: Netherlands
Posted: 10th Jul 2007 06:40     Edited: 10th Jul 2007 06:49     | link | toggle

Well,lol.i just deleted the project.lets see if i can get them back again...

EDIT:

Here is an image,sorry for the Dutch Language though.


Back to top
DaMoose
Download: Errors.png Size: 12888 bytes  View Image: Errors.png Size: 12888 bytesReport this message as abusive
Aaron Miller

User


Joined: Sat Feb 25th 2006
Location: Behind the trusty dumpster.
Posted: 10th Jul 2007 16:58           | link | toggle

@Prince of Darkness
You need the DirectX 9.0c SDK... If you go through the official thread for DBPPluginSDK, you would see how to fix this.

Cheers,

-naota

Back to top
Aex.Uni Send AIM user a message
Report this message as abusive
Silvester

User


Joined: Wed Dec 7th 2005
Location: Netherlands
Posted: 11th Jul 2007 06:02           | link | toggle

I already installed that lol,hence the reason i dont see why it doesnt work.


Back to top
DaMoose
Report this message as abusive
Benjamin

User


Joined: Sun Nov 24th 2002
Location: France
Posted: 11th Jul 2007 12:25           | link | toggle

You need to go to project options, and add an include directory for wherever the include directory is in the SDK.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Back to top
Report this message as abusive
Silvester

User


Joined: Wed Dec 7th 2005
Location: Netherlands
Posted: 12th Jul 2007 03:32           | link | toggle

Ah...I see...I'll try that Benjamin.


Back to top
DaMoose
Report this message as abusive
Aaron Miller

User


Joined: Sat Feb 25th 2006
Location: Behind the trusty dumpster.
Posted: 12th Jul 2007 03:35           | link | toggle

Also, I should note that it won't work with the MSVC++ DirectX SDK, only the Dev-C++ one.


Cheers,

-naota

Back to top
Aex.Uni Send AIM user a message
Report this message as abusive
Foe7

User


Joined: Mon Mar 26th 2007
Location: Cyberspace
Posted: 18th Jul 2007 17:15           | link | toggle

Okay, well, I fixed the problem that gave me the previous error, and it is supposed to work now (I followed these steps: https://sourceforge.net/forum/message.php?msg_id=4156252

However, guess what, it doesn't work. Here's what's wrong now:

+ Code Snippet
dllcrt2.o C:\Users\me\Desktop\PluginDev3\Results\ld No such file: No such file or directory.  
C:\Users\me\Desktop\PluginDev3\Results\Makefile.win [Build Error] n\make.exe: *** [name.dll] Error 1


and the compile log:

+ Code Snippet
 
Compiler: Default compiler 
Building Makefile: "C:\Users\me\Desktop\PluginDev3\Results\Makefile.win" 
Executing make clean 
rm -f main.o name_private.res name.dll 
 
C:\Dev-Cpp\bin\g++.exe -c main.cpp -o main.o -I"lib/gcc/mingw32/3.4.2/include" -I"include/c++/3.4.2/backward" -I"include/c++/3.4.2/mingw32" -I"include/c++/3.4.2" -I"include" -I"C:/Dev-Cpp/libexec/gcc/mingw32/3.4.2" -DBUILDING_DLL=1  
 
C:\Dev-Cpp\bin\windres.exe -i name_private.rc --input-format=rc -o name_private.res -O coff  
 
C:\Dev-Cpp\bin\dllwrap.exe --output-def libname.def --driver-name c++ --implib libname.a main.o name_private.res -L"lib" -L"C:/Dev-Cpp/libexec/gcc/mingw32/3.4.2" -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -ldinput -lddraw -ldxguid -lwinmm -o name.dll 
 
ld: dllcrt2.o: No such file: No such file or directory 
 
C:\Dev-Cpp\bin\dllwrap.exe: no export definition file provided. 
Creating one, but that may not be what you want 
C:\Dev-Cpp\bin\dllwrap.exe: c++ exited with status 1 
 
C:\Dev-Cpp\bin\make.exe: *** [name.dll] Error 1 
 
Execution terminated


so I don't know whether or not it's the code or Vista.
Back to top
Report this message as abusive
Kieran

User


Joined: Sun Aug 6th 2006
Location: Hamilton, New Zealand
Posted: 19th Jul 2007 02:40           | link | toggle

OUCH! thats the dreaded vista error
whenever it looks for a directory\Id, your doomed. Thats the error I got on vista, I was the one who switched back to XP and everything was fine.

Back to top
Report this message as abusive
NinJA999

User


Joined: Fri Nov 11th 2005
Location: NH
Posted: 19th Jul 2007 07:04     Edited: 19th Jul 2007 07:19     | link | toggle

Hmm, I followed the steps above and put the DLL into the Compiler/plugins-user folder, but DBPro's not recognizing the command!

When I look at the DLL with DLL Export, I don't see the function, only this:

agebox_Plugin.dll

Back to top
Nictitating Rabbit Send AIM user a message
Report this message as abusive
Aaron Miller

User


Joined: Sat Feb 25th 2006
Location: Behind the trusty dumpster.
Posted: 19th Jul 2007 19:04           | link | toggle

@Foe7
Kieran pretty much explained what to do.

@Kieran
Thanks.

@NinJA999
Can you show me the string table of the DLL, and your system specs?


Cheers,

-naota

Back to top
Aex.Uni Send AIM user a message
Report this message as abusive
NinJA999

User


Joined: Fri Nov 11th 2005
Location: NH
Posted: 19th Jul 2007 19:09           | link | toggle

String Table:
+ Code Snippet
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//

STRINGTABLE 
BEGIN
1 "DISPLAY MESSAGEBOX%SS%MyMessageBox"
    // Your string table goes here.
    // You must have at least ONE command for this to compile correctly.
    // Here is an example:
    /*
        1 "STARTUP%0%StartupFunction"      // void StartupFunction(void);
        2 "GETVALUE[%L%GetValueFunction"   // int GetValueFunction(void);
        3 "GETSUM[%LLL%GetSumFunction"     // int GetSumFunction(int p0, int p1);
    */

// Extra information about the string tables, for quick lookup.
/* L = Integer                         ( IN use "int" )         ( OUT use "int" )
   F = Float                           ( IN use "float" )       ( OUT use "DWORD" )
   S = String                          ( IN use "LPSTR" )       ( OUT use "DWORD" )
   O = Double Float (capital o)        ( IN use "double" )      ( OUT use "double" ) 
   R = Double Integer (capital r)      ( IN use "LONGLONG" )    ( OUT use "LONGLONG" ) 
   D = Boolean, BYTE, WORD and DWORD   ( IN use "DWORD" )       ( OUT use "DWORD" )
   0 = Zero Character (no param)       ( IN use "VOID" )        ( n/a )                 
   H = Array                           ( IN use ? )             ( OUT use ? )
   X = Any type                        ( IN use "const void*" ) ( OUT use "const void*" )
   A = Special List Processing         ( IN use ? )             ( OUT use ? )
   * = Designate a return type                                                             */
END


Sys specs:
not sure *exactly* what you mean but
DB/Dev-C++ SDK v3
Dev-C++ 4.9.9.2
DirectX 9.0c SDK
DarkBasic Pro 6.6
MS Windows XP Home
2.2ghz amd athlon xp 3500+
2.5gb ram

if that helps?

Back to top
Nictitating Rabbit Send AIM user a message
Report this message as abusive
Foe7

User


Joined: Mon Mar 26th 2007
Location: Cyberspace
Posted: 20th Jul 2007 00:10     Edited: 20th Jul 2007 00:15     | link | toggle

Well, here to report another update I've found:

It seems that the first error,

+ Code Snippet
dllcrt2.o C:UsersmeDesktopPluginDev3Resultsld No such file: No such file or directory


is simply solved by copying the file: dllcrt2.o, found in the lib folder, to your project directory. This then produces a similar error, solved by copying: crtbegin.o, found in libgccmingw3.4.2 to the project directory. During this, the second error (i guess:
+ Code Snippet
C:UsersmeDesktopPluginDev3ResultsMakefile.win [Build Error] nmake.exe: *** [name.dll] Error 1

)
remains there.

After the previous steps, i do not think that the compile log has changed. However, there is a new line of text visible under the compiler tab:

+ Code Snippet
  cannot find -lgcc 


So I don't know what it means...and sadly, going back to XP is not really an option, as this PC was bought strictly for vista, and I was told to not rollback...so hopefully there's another alternative. Sadly, MSVC# doesn't work in vista either, so i'm assuming MSVC++ won't, so I'm at a loss as to what to do

[EDIT]
Ah, yes, this only seems to happen for dll's, I'm assuming as for non-dll's it doesn't call dllcrt2 and all that.
Back to top
Report this message as abusive
NinJA999

User


Joined: Fri Nov 11th 2005
Location: NH
Posted: 20th Jul 2007 06:33           | link | toggle

I checked my problem with all of the examples, and none of the commands are recognized by DBPro!

Back to top
Nictitating Rabbit Send AIM user a message
Report this message as abusive
Zeus

User


Joined: Sat Jul 8th 2006
Location: Atop Mount Olympus
Posted: 23rd Jul 2007 20:52           | link | toggle

I get these errors.

61 C:\Dev-Cpp\header.h include\DBPPlugin\DBPPluginTemplate.h: No such file or directory.

9 C:\Dev-Cpp\main.cpp expected constructor, destructor, or type conversion before "void"

9 C:\Dev-Cpp\main.cpp expected `,' or `;' before "void"

Back to top
Zeus Software - Games by the gods.
Report this message as abusive
Kieran

User


Joined: Sun Aug 6th 2006
Location: Hamilton, New Zealand
Posted: 23rd Jul 2007 22:27     Edited: 23rd Jul 2007 22:28     | link | toggle

@JSG
would help if we had some code to look at, make sure you have installed the template properly also... If you don't know any c++ or hardly any then I suggest you do so before trying this otherwise it will be too hard.
Make sure you have a newer version of dev-c++ installed as well as this was made for dev-c++ and not a different compiler, however it may work in there.

Back to top
Report this message as abusive
Aaron Miller

User


Joined: Sat Feb 25th 2006
Location: Behind the trusty dumpster.
Posted: 23rd Jul 2007 22:38           | link | toggle

Looks to me like you either, A, didn't install the SDK correctly, or B, you added an "include/" to something...

Ex:
+ Code Snippet
#include <include/DBPPlugin/DBPPlugin.h>



Cheers,

-naota

Back to top
Aex.Uni Send AIM user a message
Report this message as abusive
Zeus

User


Joined: Sat Jul 8th 2006
Location: Atop Mount Olympus
Posted: 24th Jul 2007 09:10           | link | toggle

Here is my code.

+ Code Snippet
// Dev C++ main.cpp
// Include the header

#include "header.h"
// Include other headers here.


// Whatever code here.

// Display a messagebox
DLLCMDC void MyMessageBox(LPSTR szMessage, LPSTR szTitle)
{
    // Display a message
    MessageBoxA(GetGlobStruct()->hWnd,szMessage,szTitle,MB_OK);
}


+ Code Snippet
// header.h
/*
   There are several flags which can be defined to help the DBPPluginTemplate
   best perform to your needs. They are listed and described below:
   
    INCLUDE_DIRECTX               - This will include d3d9.h, and d3dx9.h. This
                                    will help you if you are doing some
                                    Direct3D work.
    
    NO_EXTRADX_FUNCTIONS          - This will strip out an automatically created
                                    Direct3D Object, and Direct3D Device, which
                                    would be automatically set to DBP's D3D
                                    object, and device.
    
    NO_GLOBSTRUCT                 - This will keep GlobStruct from being
                                    included. If GlobStruct isn't used, this
                                    will help keep your output DLL small.
    
    EXTRA_DBPDATA                 - This will include extra internal structures
                                    of DBP, such as the sObject, sMesh, etc.
                                    This is mainly for very special plugins
                                    which deal with manipulation.
    
    NO_EXTRA_DBPCOMMANDS          - This will keep all DBP commands from being
                                    able to be used in the plugin. There are a
                                    series of other flags which will help you
                                    keep certain
    
    NO_HELPER_FUNCTIONS           - This will keep functions such as dbpstring,
                                    dbpfloat, GetGlobstruct, etc, out of the
                                    plugin.

   The following are alternatives to NO_EXTRA_DBPCOMMANDS:
    EXCLUDE_ADVANCEDTERRAIN
    EXCLUDE_ANIMATION
    EXCLUDE_BASIC2D
    EXCLUDE_BASIC3D
    EXCLUDE_BITMAP
    EXCLUDE_CAMERA
    EXCLUDE_CORE
    EXCLUDE_FILE
    EXCLUDE_FTP
    EXCLUDE_GAMEFX
    EXCLUDE_IMAGE
    EXCLUDE_INPUT
    EXCLUDE_LIGHT
    EXCLUDE_TERRAIN
    EXCLUDE_MATRIX
    EXCLUDE_MEMBLOCKS
    EXCLUDE_MULTIPLAYER
    EXCLUDE_MUSIC
    EXCLUDE_PARTICLES
    EXCLUDE_SETUP
    EXCLUDE_SOUND
    EXCLUDE_SPRITES
    EXCLUDE_SYSTEM
    EXCLUDE_TEXT
    EXCLUDE_VECTORS
    EXCLUDE_WORLD3D
*/
// Main Include
#include <DBPPlugin/DBPPlugin.h>

// Your includes here



+ Code Snippet
// commands.rc
// Resource Script
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE        102
#define _APS_NEXT_COMMAND_VALUE         40001
#define _APS_NEXT_CONTROL_VALUE         1001
#define _APS_NEXT_SYMED_VALUE           101
#endif
#endif

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
//#include "afxres.h"

/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// English resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
#pragma code_page(1252)
#endif //_WIN32

#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

1 TEXTINCLUDE 
BEGIN
    "resource.h\0"
END

2 TEXTINCLUDE 
BEGIN
    "#include ""afxres.h""\r\n"
    "\0"
END

3 TEXTINCLUDE 
BEGIN
    "\r\n"
    "\0"
END

#endif    // APSTUDIO_INVOKED

#endif    // English resources
/////////////////////////////////////////////////////////////////////////////


/////////////////////////////////////////////////////////////////////////////
// English resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
#ifdef _WIN32
#pragma code_page(1252)
#endif //_WIN32

/////////////////////////////////////////////////////////////////////////////
//
// String Table
//

STRINGTABLE 
BEGIN
   1 "DISPLAY MESSAGEBOX%SS%MyMessageBox"
    // Your string table goes here.
    // You must have at least ONE command for this to compile correctly.
    // Here is an example:
    /*
        1 "STARTUP%0%StartupFunction"      // void StartupFunction(void);
        2 "GETVALUE[%L%GetValueFunction"   // int GetValueFunction(void);
        3 "GETSUM[%LLL%GetSumFunction"     // int GetSumFunction(int p0, int p1);
    */

// Extra information about the string tables, for quick lookup.
/* L = Integer                         ( IN use "int" )         ( OUT use "int" )
   F = Float                           ( IN use "float" )       ( OUT use "DWORD" )
   S = String                          ( IN use "LPSTR" )       ( OUT use "DWORD" )
   O = Double Float (capital o)        ( IN use "double" )      ( OUT use "double" ) 
   R = Double Integer (capital r)      ( IN use "LONGLONG" )    ( OUT use "LONGLONG" ) 
   D = Boolean, BYTE, WORD and DWORD   ( IN use "DWORD" )       ( OUT use "DWORD" )
   0 = Zero Character (no param)       ( IN use "VOID" )        ( n/a )                 
   H = Array                           ( IN use ? )             ( OUT use ? )
   X = Any type                        ( IN use "const void*" ) ( OUT use "const void*" )
   A = Special List Processing         ( IN use ? )             ( OUT use ? )
   * = Designate a return type                                                             */
END

#endif    // English resources
/////////////////////////////////////////////////////////////////////////////



#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//


/////////////////////////////////////////////////////////////////////////////
#endif    // not APSTUDIO_INVOKED


Back to top
Zeus Software - Games by the gods.
Report this message as abusive
Aaron Miller

User


Joined: Sat Feb 25th 2006
Location: Behind the trusty dumpster.
Posted: 24th Jul 2007 16:08           | link | toggle

That code should work. You may have installed the SDK wrong.


Cheers,

-naota

Back to top
Aex.Uni Send AIM user a message
Report this message as abusive

Go to the first page of this board Return to the Forum Menu Post Message
56 Messages - Page   of 2   
Search the Forum Next 40

This is a multi-page thread older than 30 days.
Go to the last page to check if you can reply to it.

Forum Search

Enter a word or phrase to search our Forum for:

Thread Subject Search
Search Phrase:
Search Scope: Entire forum
Just this board
 
Google Forum Search
Search Phrase:
 
Apollo v2.02


Dark Game Studio
Privacy Policy AUP Top of Page