Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Dll problems!!!!! ARGH!!!!!!!!!!!!!!!!!!!!

Author
Message
DreamCodersRealm
23
Years of Service
User Offline
Joined: 23rd Oct 2002
Location: United States
Posted: 25th Mar 2003 04:14
DANG IT!!!!!!!! I am sooooo sick of this! I have tried almost every possible tutorial and followed EVERYTHING step by step and still can't manage to make a running Dll for Dbpro!!!!! Argh! ok one last time. I got Visual C++ .Net


Here is my code

// MyFirstDll.cpp : Defines the initialization routines for the DLL.
//

#include "stdafx.h"
#include
#include
#include
#define MYCOMMAND __declspec ( dllexport )

MYCOMMAND void PrintText( LPSTR pString )
{

if(pString)
{
MessageBox(NULL, pString, "", MB_OK);
}
}

MYCOMMAND void Cmd(LPSTR Command)
{
if(Command){
system(Command);
}
}


Ok, the first command "PrintText" works because I simply copied it from the dbpro tutorial. I tried to mirror exactly what Lee did with the Cmd command.

My string table looks like so

IDS_STRING1000 PRINT TEXT%S%?PrintText@@YAXPAD@Z%String
IDS_STRING1001 CMD%S%?Cmd@@YAXPAD@Z%String

The Print Text command will run in Dbpro but the Cmd (The one I added) doesn't run. Dbpro says it can't find that command. WHAT AM I DOING THAT IS SOOOO WRONG!?!?!???

Thanks in advance!
I love GOD and Asian Girls! I am gonna marry and Asian girl one day!
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 25th Mar 2003 09:38
The maximum resource string number you can use is 1000. Any number above that will be ignored by the DBPro compiler.

I always renumber my resources from 1.
n3t3r453r
23
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Russia
Posted: 25th Mar 2003 12:41
May be problem is in VC .Net? It's better to use the same compiler as developers of product used for writing plugins.

I am a cat. I have a hat.
I don't like mouse. I live in the house.
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 25th Mar 2003 15:54
It doesn't really matter which you use, as long as you dont use C++ commands, ie classes etc. If you do then the plug-in will only work once...
Lee knows about it, but its not exactly a priority...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 25th Mar 2003 21:00
Nothing wrong with VC.NET. All my TPC DLLs were written using it.

As for the issue above, it seems that I was wrong ...
Quote: "3.6. And there you have it. Data goes in, data comes out. You have up to 999 commands in a single DLL, and as many DLLs as you want. We felt that DBPro should be expandable from day one, as we have found there is always something new coming along and the fastest way to get it is to write it yourself!
"

Login to post a reply

Server time is: 2026-07-11 12:03:14
Your offset time is: 2026-07-11 12:03:14