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 / Use .Net Dll's In DBP And Other Languages

Author
Message
ZKAT8IT
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location:
Posted: 13th Jun 2005 05:40 Edited at: 13th Jun 2005 05:45
I've written a program to allow you to use .Net Dll's in DBP and other languages. What it does is create a new dll with an export table of the functions and subs of your choosing. For use of DBP, you can use the 'call dll' command or as a TPC for DBP. I have also added support so you can use the Constructor, Destructor, and ReceiveCoreDataPtr subs. As for other languages I have added the ability to export your functions or subs as StdCall or Cdecl. This program is near completion and CattleRustler will post a TPC created with this program later. He will explain further details on that matter. I'll keep posting on the progress of the program. Here is a screenshot of the program for now.

Id also like to thank everyone who helped with the program. This includes APEXnow, CattleRustler, MX7, and TheWendigo aka TheSturgeon.



Eddie B
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location:
Posted: 13th Jun 2005 05:46
wow That is very nice

DirectX in the learning
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 13th Jun 2005 08:16
Is this the same program that you were working on when the_winch released his dll converter? And will their be a price? And is your program themed that way or is that how your computer themes the program?


Click sig for DB Network X
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 13th Jun 2005 10:20
lol, thats what I said to him.
Ill try and post a beta TPC for dbp. The code is done, just need to write up the function descriptions. It's a beta version of an Input Console (those of you familiar with DBP_NETLIB Output Console might appreciate this one) suggested by our buddy Adr. I just want a few people to hammer the tpc and see if anything odd happens. The test will not be for the TPC itself (its design or functionality) but rather to test the integrity of the DLL COnverter that produces the dbp tpc (ZK's app)

Ill try and have it here tonight.

DBP - AirAmericaRadio.com - MoveOn.org - The news has been cancelled!
ZKAT8IT
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location:
Posted: 13th Jun 2005 10:33
Yes this is the same I was working on when the_winch released his program. Yes, there will be a price, which I am unclear of how much at the moment. As for the theme, it came with my video card.

APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 13th Jun 2005 10:34 Edited at: 13th Jun 2005 10:35
Adding to that, when CattleRustler does post the TPC, pay particular attention to functions that return strings. This has been quite a nightmare for the lot of us over the last couple of weeks.

Overall, an excellent application when fully released.

Paul.


Home of the Cartography Shop - DarkBASIC Professional map importer
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 13th Jun 2005 23:41 Edited at: 14th Jun 2005 00:54
Let me reiterate that this TPC is not a complete item, and is merely a beta test for the “proof of concept” of an Input Console, but more importantly is to test integrity of the dll that is produced by ZK’s converter application.


Download TPC:http://www.mod2software.com/misc/inputconsole_exp.zip

Description:
The InputConsole is simply a data holding object that allows you to input and alter variable values in your DBP application from outside of the DBP application at runtime. You can manipulate data values from your DBP code as well as from the InputConsole’s UI. Currently 4 major DBP data types are supported: Integer, String, DWord, and Float (the correlating vb.net types are Integer, Uint32, Uint32, and Single) There is a 100-elemnt Object array held in the dll for your values. Any of the 4 value types can be stored in any of the 100 elements. All elements are initialized with 0 (zero) as type Object (VB.NET base class, inherited by all other objects regardless of extended type) for their value. Element Indexes are zero based (0-99). Providing an index argument outside of this range (0-99) will produce an error and crash.

Setup:
Copy the file InputConsole_EXP.dll to your plugins-user directory like you would any other TPC. No wrapper dll is required in the exe dir

Usage from DBP Code:
Below is a function listing, any required arguments for each, and a brief description of the function/method itself.

Public Shared Function IC_Init() As Integer
You must call this function prior to any others. It initializes the component for use. Returns 1 on success, 0 on fail (as integer)

Public Shared Sub IC_ResetValues()
Call this method at any time to reset all 100 elements of the Object array to 0 (zero)

Public Shared Sub IC_Show()
Call this method at any time to display the InputConsole’s UI

Public Shared Sub IC_Hide()
Call this method at any time to hide the InputConsole’s UI

GET FUNCTIONS – RETRIEVE DATA FROM INPUT CONSOLE
Public Shared Function IC_GetValueAsString(ByVal OldStr As UInt32, ByVal index As Integer) As UInt32
Call this function to return a string held in the IC. Please note that you need only pass in the Index value of the item to retrieve. OldStr argument is used behind the scenes by DBP and does not need to be provided by the user. Your call from DBP should look like: myString=IC_GetValueAsString(Index)

Public Shared Function IC_GetValueAsInteger(ByVal index As Integer) As Integer
Call this function to return an Integer held in the IC, providing the index of the element to return (0-99)

Public Shared Function IC_GetValueAsFloat(ByVal index As Integer) As Single
Call this function to return an Float held in the IC, providing the index of the element to return (0-99)

Public Shared Function IC_GetValueAsDword(ByVal index As Integer) As UInt32
Call this function to return a Dword held in the IC, providing the index of the element to return (0-99)


SET FUNCTION – SETTING ELEMENTS OF THE IC WITH VALUES
Public Shared Sub IC_SetValueAsString(ByVal index As Integer, ByVal sValue As String)
Use this method to set an element with a String value by providing the index value (0-99), and the string to set.

Public Shared Sub IC_SetValueAsInteger(ByVal index As Integer, ByVal iValue As Integer)
Use this method to set an element with an Integer value by providing the index value (0-99), and the integer to set.

Public Shared Sub IC_SetValueAsFloat(ByVal index As Integer, ByVal fValue As Single)
Use this method to set an element with a Float value by providing the index value (0-99), and the float to set.

Public Shared Sub IC_SetValueAsDword(ByVal index As Integer, ByVal dValue As UInt32)
Use this method to set an element with a Dword value by providing the index value (0-99), and the dword to set.


OTHER TEST FUNCTIONS THAT RETURN STRINGS
Public Shared Function IC_str_Mid(ByVal OldStr As UInt32, _
ByVal Str As String, _
ByVal Start As Integer, _
ByVal Length As Integer) As UInt32

A simple string Mid function that returns a substring of the passed in string. Provide the 1-based start character, and length of the substring to return. (Again, ignore OldStr argument, this is used by DBP behind the scenes.)
DBP Example: myString= IC_str_Mid(“Hello”,2,3)
myString would yield: “ell”

Public Shared Function IC_Now(ByVal OldStr As UInt32) As UInt32
No arguments required. Returns the date and time (in your system’s format) as a string.
DBP Example: myString=IC_Now()
myString would yield: “6/13/2005 10:15:00” or equivalent based on your region and system settings.

USAGE FROM INPUTCONSOLE UI
Select any element in the list and type a value for it in the text field. Press the button to set the value for the selected element. The value for that element will immediately change. Any var in DBP that is pointing to this element will receive the new value. Be careful to not mix and match types for a particular element or you may produce a DBP error. Use the reset button at any time to clear and reset the IC array elements.

DBP SAMPLE CODE:
Just a simple example of how to call the Input Console. Hopefully anyone beta testing will think of more clever things to try



Please post in this thread if you can beta test the TPC and please describe and problems you may have encountered, in as much detail as possible. ZKAT8IT, APEXnow, and myself will be available to help.

Thanks in advance for the testing!


DBP - AirAmericaRadio.com - MoveOn.org - The news has been cancelled!
ZKAT8IT
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location:
Posted: 15th Jun 2005 00:37
I have now made a Module for the .Net languages containing a Declare statement for just about every DBP command, so you can now make objects and call any other DBP command from your .Net dll's. All you have to do is include the Module into your dll project.

dj blackdragon3710
20
Years of Service
User Offline
Joined: 5th Nov 2004
Location: In LaLa land
Posted: 15th Jun 2005 01:40
Did you ever answer the question about the theme? I would really like to know, in case I missed it.

<<<<<Used to be "djblackdragon" with being registered in January, 2003, no matter what it says on the left<<<<<
ZKAT8IT
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location:
Posted: 15th Jun 2005 09:23
Yes, and as i stated before, that is just my windows theme.

dj blackdragon3710
20
Years of Service
User Offline
Joined: 5th Nov 2004
Location: In LaLa land
Posted: 15th Jun 2005 11:20
Like I said, I may have missed it. Thank you for answering my question.
Quote: " in case I missed it."


<<<<<Used to be "djblackdragon" with being registered in January, 2003, no matter what it says on the left<<<<<
ZKAT8IT
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location:
Posted: 22nd Jun 2005 07:52 Edited at: 23rd Jun 2005 02:35
I have updated the converter and made a Trial/Demo version of it for you everyone to play with. The help files are still unfinished though. Though there are examples for VB.Net and C#.Net. There are now two modes. Normal, and Compact mode. Heres screenshots of each.

http://img.photobucket.com/albums/v82/ZKAT8IT/Dll_Conv_1.jpg
http://img.photobucket.com/albums/v82/ZKAT8IT/Dll_Conv_2.jpg

You can also save profiles now. Exporting of the Constructor, Destructor, and ReceiveDataCorePtr functions are supported also for use in a DBP TPC. This demo will only export the first 4 functions listed in the exports table. Please notify me if you find any bugs or have any suggestions. Also, for TPC's the functions must be exported as Cdecl.

[Edit] Download Updated, few bugs fixed.
Download:
http://dse.redgaming.net/ftp/Net_Dll_Converter_Trial-6-22-05.zip

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 30th Jun 2005 03:11
So far this application is stellar. I am now working on a Database TPC that uses this app to convert for dbp and so far its flawless. The TPC currently allows you to work with MS Access databases from DBP, and soon I will add SQL Server support. There is a thread in WIP for my tpc.

Great work ZK, this app rocks

DBP Plugins Latest Plugin: DBP_TPC_Databases

Login to post a reply

Server time is: 2024-11-23 05:41:50
Your offset time is: 2024-11-23 05:41:50