mIRC Home    About    Download    Register    News    Help

Print Thread
C# and DLL , Please give little help :) #102727 12/11/04 05:04 PM
Joined: Nov 2004
Posts: 6
A
arbours Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Nov 2004
Posts: 6
Hi cool

Recently, I've been trying to make some kind of shitlist with an dll that check over a MDB (Access) database. Actually, the DLL is working fine for being benchmarking into a "test" application that did emulate hundred of call by couples of second. there is 3 basic method in it : checkban, addban, checkbanchannel. laugh

Now that is my situation :
Im using a Windows XP Professional, p4 2.4 512k , well enough good computer I think. I had some example of a little dll using regasm.exe for supporting COM Object with my dll, (which I had been familiar over pass for being supporting vb6). But the little problem is over the stability... my mIRC crash hardcore on me mad, I'm actually using $comcall for multithreading and this is not getting me better result. (Since much poeple can join at time, I need it multi-threaded). This idea would be to use a ODBC connector that I make in C# to be able to query over MySQL and then if offline, over the cache in MDB.

My question is : confused
I heard that C# dll for mIRC can be done in two way. COM and the others one. Is that true ? How it called and finnaly, could some1 just give me a little template of a simple method/class with this other method.

It would be very instructive and appreciated smile

Re: C# and DLL , Please give little help :) #102728 12/11/04 07:21 PM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Ok,

I know this isn't the response that you are asking for however...

Use a hash table: /help hash tables. When effectively used, you won't need a DLL at all, even with many people joining at the same time.

Greets


Gone.
Re: C# and DLL , Please give little help :) #102729 13/11/04 05:13 AM
Joined: Nov 2004
Posts: 6
A
arbours Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Nov 2004
Posts: 6
Yea, actually, I did know about hash table, but unless you have a multi-thread hash table retreivement, it unless for my need frown.

Re: C# and DLL , Please give little help :) #102730 13/11/04 01:49 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
But seeing as mIRC scripting itself is not multi-threaded what's the issue? You can call $comcall() to have it retrieve the value in another thread, but the time it takes to retrieve the value from a hash table is negligable anyway.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: C# and DLL , Please give little help :) #102731 13/11/04 05:53 PM
Joined: Nov 2004
Posts: 6
A
arbours Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Nov 2004
Posts: 6
Actually, like I just said, a simple DLL of C# used as a COM Objec into mIRC is not stable. I don't know why exactly this happening, but when I hav too much comcall, it simply randomly crash. I would understand if my dll would be coded wrong but it actually work fine for 25% of the time (when mIRC dosnt crash) and had been tested over a benchmark test app.

Anyway, I feel like repeating here, but just to be sure that I might get what I'm asking / looking for instead of others informations.

There is a way to build a DLL in C++ so you don't need to use comobject, only $dll and those. the mIRC help file give C++ method example of struct and stuff, but did anyone make a C# version of this ? Could he parse this here on a little class template including the Load, Unload and others dll stuff in it, and with a brief explaination.

Im pretty sure that is the com object that crash on me, so testing this would give me a good hint on what to do next.

Thank in advance
Steve,

Last edited by arbours; 13/11/04 05:53 PM.