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.

Work in Progress / .NET Dll's in DBP

Author
Message
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 27th Dec 2004 05:02 Edited at: 31st Dec 2004 07:03
Since it doesn't look like the other one will ever be released I did a bit of research and wrote my own.
It basically just uses the method here.

It's not well tested so will proberly have a few bugs.

Download from http://winch.pinkbile.com/dll_tool.php

To use it load your dll. Select a method you want to export and click the ">" button. Type in the name you want the exported function to have. When you have moved all the methods you want to export click the build button and the new dll will be built. You can then use the dll in dbpro using the CALL DLL command or as a TPC if you manually add a string table.

Quote: "this is not a quote"
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 27th Dec 2004 05:41 Edited at: 27th Dec 2004 05:46
"the other one" as you put it already does what yours does, and the author was implementing automatic Plugin generation. Did you have the right to make your version? Sure you did. Are you the biggest hippocrate on legs? Yes you are. You've taken every possible chance to knock down other peoples work and their ideas, saying that no one needs plugins or dll's etc, then, you go and do something along the same lines that they were doing, or would have done - and I dont mean this program specifically, I mean in general over time, it has been your trait.


pfft, good luck

[EDIT] Not to mention you clearly named this thread to add confusion with the "other one". Youre some piece of work.

1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 27th Dec 2004 07:15 Edited at: 28th Dec 2004 00:17
complaint withdrawn


Click the sig
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 27th Dec 2004 07:42
and if you read my post I said that I am not talking about this program in particular - Its an ongoing observation and trait of the_winch IMHO - basically a "bottom-feeder" type of "you suck, you suck, until I do it too" type of attitude. Also, "the other" program was used and tested by myself and others and does work obviously. I have already had a falling-out with the other author (resolved) so I am not here defending some stake in his app, I am defending the general prinacipal.

Reread my post and tell me if your post to it makes sense.

Mattman
20
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 27th Dec 2004 12:02
[opinion] I feel that what the_winch is doing here is perfectly acceptable. From what I can tell is that he's tired of waiting for a tool so hes making it himself. Simple as that. Let's say somebody doesn't want to wait a year for new 128mb video card (i have no clue what the specs of a top line video card is ) Nobody's gonna get mad if he beats ATI to the release date of their video card are they? [/opinion]

Hi
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 27th Dec 2004 14:04
true.
hence:
Quote: "Did you have the right to make your version? Sure you did."


not in dispute.

Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 27th Dec 2004 21:09
Added to my VB.NET DLL List thing in the DLL Talk Forum.


"Computers are useless, they can only give you christmasy answers."
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 31st Dec 2004 09:11


Version 0.2 released, just tidied up the gui a bit and now you can add string tables for easier plugin creation.

Download here

Quote: "this is not a quote"
Dot Merix
20
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Canada
Posted: 31st Dec 2004 09:19
I've yet to even get the program running...

I get ilasm not found error.



WindowsXP Home(Service pack 2), Athlon XP 2400+(2.1Ghz), 1GIG Ram, Ati Radeon 9800Pro 128MB.
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 31st Dec 2004 09:47
I proberly shouldn't have hardcoded the paths
I have uploaded a new version that should work out the paths to ilasm and ildasm.

Quote: "this is not a quote"
Dot Merix
20
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Canada
Posted: 31st Dec 2004 09:51
Well, the programs opens now.. I'd test it, but i havent learnt much about dll's in the sense of: How to make them/how to use them after i make them.

I do have visual basic.net 2003, aswell as the beta for 2005..

A really simple tutorial on how to make dll's in either one of those would be neat to.. Simple ones like returning variables after they've been calculated by the dll etc.



WindowsXP Home(Service pack 2), Athlon XP 2400+(2.1Ghz), 1GIG Ram, Ati Radeon 9800Pro 128MB.
Neil19533
20
Years of Service
User Offline
Joined: 30th Aug 2003
Location: England
Posted: 31st Dec 2004 17:31 Edited at: 31st Dec 2004 18:01
when i tried this program it didnt work, i tried your example and that worked. but when i made a simple dll in visual basic it never worked mabey you could try?

Any spelling mistakes are totally In tensional.
IanG
19
Years of Service
User Offline
Joined: 25th Sep 2004
Location: Cyberspace
Posted: 31st Dec 2004 20:11 Edited at: 31st Dec 2004 20:21
small little question - what do you make in vb.net 2003, a class lib?

[edit] never mind [/edit]

Used to be Phoenix_insane registered in september 2003 despite what the date says to the left <--
PC - amd athlon 2.0ghz, 512mb, GeForce FX 5200 128mb, 200gb, xp pro sp2
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 1st Jan 2005 02:02
If you have vs .net standard you have to manually edit the project file to change the output type to make it compile a dll.

Your project should have a .csproj or .vbproj file. Open it in a text editor and change it so
OutputType = "Libary"
StartupObject = ""

Or you could just use SharpDevelop which allows you to create a libary with less messing about.

This is the short example converted to vb


Quote: "this is not a quote"
IanG
19
Years of Service
User Offline
Joined: 25th Sep 2004
Location: Cyberspace
Posted: 1st Jan 2005 04:06
thanks

Used to be Phoenix_insane registered in september 2003 despite what the date says to the left <--
PC - amd athlon 2.0ghz, 512mb, GeForce FX 5200 128mb, 200gb, xp pro sp2
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 2nd Jan 2005 00:19
I have made a dll that I used this program with (called DarkBASIC Network X). And is their an easier way to move about 70 functions over to the export listbox without having to put the name for all of them before they get their. I spent about an hour doing this with DBNX. And I don't really get what to do with the stringtable to make the dll like a TPC. How do we format the stringtable so that DBP recognizes it when it is put in the plugin user folder.


Click the sig
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 2nd Jan 2005 03:05
For what to put in the string table read the TPC document at
c:\Program Files\Dark Basic Software\Dark Basic Professional\Help\documents\1 Third Party Commands.htm
It tells you all about the string tables and pretty much everything else you need to know like how to return strings to dbpro.

Currently you can only have a maximum of 15 string table items. It should be easy enough to remove the limit and the next version should be fine with 70+ string table items.

Also I think it should be possible to change it so you don't have to manually enter an export name.

Quote: "this is not a quote"
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 2nd Jan 2005 03:16 Edited at: 2nd Jan 2005 03:17
That would be great, and I am looking forward to the next update.

By the way, could you make the top left listbox anchored on all sides so when you resize the window that also changes, because with that small box you can't really see the whole method.

Also, the program seems to crash when you try to build a big dll file with the program.


Click the sig
ZKAT8IT
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location:
Posted: 2nd Jan 2005 08:33
I have not abonded my project, although I am mad that I take a week off due to holidays to find out you copy my work. The main reason due to the delay though was because I was solving a major issue that I am sure you have yet to acknowledge or even know how to solve. I have however posted a download link to a demo in my thread for those of you wishing to try it.
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 2nd Jan 2005 10:11 Edited at: 9th Jan 2005 00:47
I have reworked the gui to make it simpler to use with large dlls. You should now be able to load the dll and just select all the methods and move them to the exports list.

Quote: "The main reason due to the delay though was because I was solving a major issue that I am sure you have yet to acknowledge or even know how to solve."


At a guess it's because you are trying to return a string from a plugin without using dbpros memory management functions. The reason why the parameter looks like it is getting lost is because when you return a string from a plugin the first parameter dbpro will pass to your funtion is a pointer to an old string.
So for a funtion that returns a string and accepts one string the function should look like
public static string function(int pOldString, string test)
Of course I could be completly wrong.

Quote: "this is not a quote"
ZKAT8IT
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location:
Posted: 2nd Jan 2005 10:22
Returning a string isn't the problem, it's getting the string into the function. And yes, I know it sends a pointer, not the string to a function.
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 2nd Jan 2005 10:42 Edited at: 2nd Jan 2005 10:52
Quote: "Returning a string isn't the problem, it's getting the string into the function. And yes, I know it sends a pointer, not the string to a function."


Just to clarify when dbpro calls a plugin function that returns a string it sends a pointer to an old string followed by the rest of the parameters specified in the string table.

So if you where to try to use a function like this
Public Shared Function function(ByVal test As String) As String
MessageBox.Show(test)
Return "a string"
End Function

The string will appear to be lost as dbpro is actully calling the function as
function(pOldString, test)
Your function will then have the value of pOldString instead of what it was expecting. If the dbpro exe has just started an no other strings have been returned the pOldString is probely just pointing to an empty string.

What you should actually use is something like this
Public Shared Function function(ByVal pOldString As Integer,ByVal test As String) As Int
`use dbpro memory managment funtions to delete pOldString if required and create a new string
Return dword pointer to new string
End Function

As per the example in the TPC docs


Quote: "this is not a quote"
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 2nd Jan 2005 11:14


no?
However you did sidetrack what he said... problem isn't export but import. It isn't much of a problem really, it just requires an intelligence source scanner. Because in order to allow strings i/o you have to add unsafe/delegated code, in such you have to hard code the pointer; blah blah, the end result really causes systemic problem where things are being accessed and declared as unsafe and such long before they're even processed and declared as variables.

You can imagine the headaches this causes
Either way, it isn't really much of a problem provied you know what options to set and are comfortable hand compiling your DLL; a problem does still remain and that's adding the string tables, but then that is a pretty easy one.


1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 3rd Jan 2005 04:17
Very quick updates, very much appreciated. Thanks the_winch. Will try out the program again.


Click the sig
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 3rd Jan 2005 05:00 Edited at: 3rd Jan 2005 05:01
Got this error




Click the sig

Attachments

Login to view attachments
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 3rd Jan 2005 05:04
These are the two files that I am trying to convert with your converter. they are zipped so their is only one attachment. In their are two files DBNXVB.dll and DBNXRegVB.dll. When trying to convert DBNXVB.dll is when I got the above message, and DLL Tool crashed when I tried DBNXRegVB.dll.


Click the sig

Attachments

Login to view attachments
Scilynt
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: .-#-.
Posted: 3rd Jan 2005 06:46 Edited at: 4th Jan 2005 10:58
The reason for crashing when you use DBNXVB.dll is that one of the method lines is



And this tool expects to find a bracket in a method line. When it doesn't -1 is passed to the LastIndexOf command which is not a valid value.

Although DBNXRegVB.dll doesn't cause any problem for me.
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 3rd Jan 2005 09:46 Edited at: 3rd Jan 2005 09:46
I just released v0.5 that fixes that problem. It now ignores .method lines with no opening bracket.

I also finished the automatic string table generation alough it may still have the odd bug so check it's producing the correct strings.

I also think I have found a bit of a problem. I think the dlls produced are using stdcall which is find when using the CALL DLL commands but with plugins dbpro uses cdecl. If you use it to make plugins expect the occasional error message when dbpro exits. Thats what I think the problem is anyway.

Quote: "this is not a quote"
Neil19533
20
Years of Service
User Offline
Joined: 30th Aug 2003
Location: England
Posted: 4th Jan 2005 03:11
do you know of a way to get forms to load as i have tried and it aint working

Any spelling mistakes are totally In tensional.
IanG
19
Years of Service
User Offline
Joined: 25th Sep 2004
Location: Cyberspace
Posted: 4th Jan 2005 03:29
form.show ?? call it from a function

Used to be Phoenix_insane registered in september 2003 despite what the date says to the left <--
PC - amd athlon 2.0ghz, 512mb, GeForce FX 5200 128mb, 200gb, xp pro sp2
Neil19533
20
Years of Service
User Offline
Joined: 30th Aug 2003
Location: England
Posted: 4th Jan 2005 03:38
i got it working but i had to

dim myform as new form1

Any spelling mistakes are totally In tensional.
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 4th Jan 2005 05:08
Thanks for the updates, I'll try it again.


Click the sig
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 4th Jan 2005 08:19
@the_winch
I have tested your program again and the program crashed again. Your program will make the pdb file, then the program will freeze.


Click the sig
Neil19533
20
Years of Service
User Offline
Joined: 30th Aug 2003
Location: England
Posted: 4th Jan 2005 08:27
post some code and ill test it.

Any spelling mistakes are totally In tensional.
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 5th Jan 2005 04:32
Well I don't really see the point in doing that, VS.NET makes the DBNXVB.dll's fine, the problem is with the_winch's program. By the way I have changed the dll so that no form component commands are in the libraries that are being converted and I still get the same problem.


Click the sig
Neil19533
20
Years of Service
User Offline
Joined: 30th Aug 2003
Location: England
Posted: 5th Jan 2005 05:16
it seems to work fine for me i would recommend trying something simple like a msgbox or something just to see if it is working at all.

Any spelling mistakes are totally In tensional.
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 5th Jan 2005 06:36 Edited at: 5th Jan 2005 06:41
I have reorganized the structure of my project, it is now 7 files, and they all worked fine. Except for one that I still need to change. By the way DBNX the program I was converting can be seen in the official forum.


Click the sig
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 5th Jan 2005 08:44
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 5th Jan 2005 22:00
????
All I was saying was that I fixed the problem.


Click the sig
Three Score
19
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 6th Feb 2005 08:29
ummm do the dlls exported use .net and do these have to be .net or vb dlls for this to work otherwaise the "other thing" may be what i need cause i dont feel like downloadign the .net sdk and i am using dlls made in c and c++ not stupid vb or vb.net

my avatar is working for the first time since free-space went down
http://hck83.tophernet.net (things are startign to look up)
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 6th Feb 2005 09:46
Yes the exported dlls use .net and they do have to be .net dlls for it to work.

If you are using dlls made with c/c++ you don't need to modify them to use them with dbpro so I don't get what you need a program for.

Quote: "this is not a quote"
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 7th Feb 2005 01:39
@the_winch
I have tried many times to use the declare statement in VB and use it with your program, but it crashes your program.

Example:


I took this code directly out of DarkBASIC Network X (excluding some of the other commands), these are the commands that I have tried to use API for, but your program keeps crashing. I just quickly put in the code for the swapmousebuttons to give you an example.


Click sig for DB Network X
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 11th Feb 2005 03:13
This small example doesn't crash it.



You need to make sure not to move the "pinvokeimpl" method to the exports list otherwise it has problems.

Unfortunatly when you try to use the dll in dbpro the dbpro exe quits when you use the command.

Quote: "this is not a quote"
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 11th Feb 2005 07:01
That's another problem I have been having. I am not sure if it is because of the dll_tool, but I try to capture the DBP window by using the microsoft.visualbasic.compatability.vb6.getactivecontrol.findform namespace and trying to disable the minimizebox for the DBP window, but for some reason it crashes DBP. Is this a problem with your program or with my coding. I can post an example if needed.

And is their a way you can fix the declare function problem?

Thanks,
1tg46


Click sig for DB Network X

Login to post a reply

Server time is: 2024-04-20 00:52:35
Your offset time is: 2024-04-20 00:52:35