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.

DLL Talk / Stringtable problem?

Author
Message
Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 5th Dec 2010 18:10
Alright, I have almost finished my LE4DBP plugin so I decided to take a break and write a utility to generate my stringtable and keywords ini, but now I'm running into problems. I am getting "cannot understand command" errors when compiling.

The command i'm having difficulties with is my RegisterAbstractPath function. The entry in the string table reads as follows:

IDS_STRING145, "RegisterAbstractPath%S%LE_RegisterAbstractPath%TODO"

It does not have a return value so my generator did not add the bracket, and it only has one input which is a string. The commands internal name is LE_RegisterAbstractPath.

I don't think the keyword file would matter as much, but just in case, its entry is as follows:

RegisterAbstractPath=main.htm=(*todo*)

In case it matters, i should also mention that I am attaching the stringtable with ResHack.

Thank for any and all help,
Randy
Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 5th Dec 2010 20:48
Sorry for the double post. I have found out how to add a string table by including it with my project and now everything is working, except any commands that would create any kind of memory are springing a syntax error. Using the call dll method, this was not an issue, but I noticed with making a TPC you can make a Constructor and Destructor. The problem i have with this is that i need my memory to stay in global scope so that my functions have access to them. Any suggestions?
Chris66
14
Years of Service
User Offline
Joined: 12th Aug 2009
Location:
Posted: 5th Dec 2010 23:37
DBP calls Destructor just before closing the application if I'am not wrong.

So, since Constructor is called when the dll is loaded, any function using mem allocated here should be available till the end of the program.

Am I wrong ?

Chris
Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 6th Dec 2010 01:35
Thats what i thought at first, too. I took my global variables and moved them into the constructor, but then my other functions didn't recognize them because they are no longer in global scope. I tried researching to see if you can prototype a variable in global scope then actually initialize it in the constructor, but i haven't had any luck yet. I must confess I'm not that advanced at cpp, but i can't believe something so mundane is stopping me from finishing this now, lol.
Chris66
14
Years of Service
User Offline
Joined: 12th Aug 2009
Location:
Posted: 6th Dec 2010 12:22 Edited at: 6th Dec 2010 15:41
Maybe you can have a solution using shared memory? http://msdn.microsoft.com/en-us/library/ms686958(VS.85).aspx

Not sure this will help a lot as I don't know what your code is doing exactly.

Chris
Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 6th Dec 2010 13:06 Edited at: 6th Dec 2010 13:12
Still haven't found a solution yet, but I'm taking a look at the matrix plugin source code, and I'm confidant I will find a solution.

I'm beginning to think it may be due to my stringtable and keyword list again. Even though the commands in question look as though they are properly set up, I am wondering if a type parsed earlier in either list can be throwing these syntax errors. I thought making a generator would be a good idea for the two lists and the 315+ commands, but I'll see if manually adding the questionable commands to the lists works. After I get outta work anyways.

EDIT: I should explain the problem I'm having a little better, too, just in case. I have a header file where I initiate several variables and arrays to store Leadwerks entities in, that way i can reference them numerically in my commands. With the call dll method, this was fine. At dll load, it loaded the variables into memory and let me use my creation commands. After making a string table, and keywords.ini, and I place the dll in plugins-user, they appear to be broken.

Thanks for your help.
Randy
Chris66
14
Years of Service
User Offline
Joined: 12th Aug 2009
Location:
Posted: 6th Dec 2010 23:55
Maybe posting some snippets will help (short parts of the header file / Stringtable / C++ Code of one function of the DLL, def file (if used) etc... Just to have a more concrete idea about the structure of the project.


Sorry for my lack of knowlege but what is the structure/use of the keyboard.ini?

Cheers,
Chris
Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 7th Dec 2010 00:26
I would love to, but it contains header commands which would violate the Leadwerks EULA. Believe me, I would have already if I could.

I'm gettin ready to test the stringtable/keywords maually here in a bit after dinner. If I have any luck, I'll be sure to post.

I'm almost certain if I can run it using CALL DLL, I can make a TPC plugin. If thats the case, it has to be my stringtable.
Chris66
14
Years of Service
User Offline
Joined: 12th Aug 2009
Location:
Posted: 7th Dec 2010 01:12 Edited at: 7th Dec 2010 01:12
Ok.

I keep my fingers crossed.

Please let us know.

Cheers,
Chris
Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 7th Dec 2010 03:12
I appreciate the help but it seems as though my assumptions were correct. My generator was periodically adding typos with sections it could not parse properly. I came to this conclusion by clearing my stringtable and starting from scratch. I then started adding the commands from my test app to the stringtable one by one. Sure enough it worked.

For now, I think I will just go ahead and dedicate a few hours to type the string table manually while testing each command. It will take longer for release, but I'd rather have a better quality plugin anyways.

Thanks again for the help!

Login to post a reply

Server time is: 2024-04-24 08:46:05
Your offset time is: 2024-04-24 08:46:05