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 / Writing a DLL in C#

Author
Message
fpsfreak
16
Years of Service
User Offline
Joined: 18th Jun 2007
Location:
Posted: 14th Aug 2007 03:28
How would i do it? Now i dont mean converting the .NEt framework or osmethign like that. I mean the CODE! I want a example code.
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 14th Aug 2007 03:36 Edited at: 14th Aug 2007 03:38
write a class, like you would in any other dll project

the only thing to consider is if you plan to do a conversion with a tool (like zkat's for example) there are scoping rules to take into account (like Public Shared... for the methods etc) Not sure how this applies to other conversion methods. Other than that you just write your code like you would if it was for use as a dll for the native platform.

im sure you can find class code examples for c# online

My DBP plugins page is now hosted [href]here[/href]
fpsfreak
16
Years of Service
User Offline
Joined: 18th Jun 2007
Location:
Posted: 14th Aug 2007 03:59 Edited at: 14th Aug 2007 04:02
Ok plz


I made that code alone and it compiles. I have no string tables how would i make them and whow would i call the function above in DB?
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 14th Aug 2007 04:03
in a resource file

if using a coverter like zk's, it builds the string tables automatically, but also lets you edit them before compiling the exported version of the dll. pretty neat.

My DBP plugins page is now hosted [href]here[/href]
fpsfreak
16
Years of Service
User Offline
Joined: 18th Jun 2007
Location:
Posted: 14th Aug 2007 04:05
how would i call the function in Db and thanks a lot!
fpsfreak
16
Years of Service
User Offline
Joined: 18th Jun 2007
Location:
Posted: 14th Aug 2007 05:47
anyone...???
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 14th Aug 2007 15:10
well, once you have the dll and string table compiled, and if you have exported it so dbp can use it (by converting it) you'd place the dll in the dbp plugins-user directory, then from dbp code you'd simply call the function name. If you include a keywords ini file the ide's will recognize the function names and will hilite them in your code, and will display info about the function (name, args, etc) in the status bar at the bottom (using stock ide as an example)

My DBP plugins page is now hosted [href]here[/href]

Login to post a reply

Server time is: 2024-05-22 19:24:05
Your offset time is: 2024-05-22 19:24:05