473,799 Members | 2,723 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

export dll function

Hello,

I'm trying to write a program (dll) to use with mIRC.
mIRC wants me to use these kind of functions:

int __stdcall procname(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL
show, BOOL nopause)

translated into C# code, I think it's this:

int function(int mWnd,int aWnd, char [] data, char [] parms, bool show,bool
nopause)

now another problem is exporting this function so mIRC can see it. A
tutorial says something about creating a DEF file, but that's probably only
for C++? A search on MSDN gave me this: "This requires a DLL export, which
..NET Framework does not support" Does this mean I can't do this and all my
work was for nothing?

tia,
Nov 15 '05 #1
8 20378
You will not be able to export dll function in C#. Maybe
mIRC will take COM objects?

Tu-Thach
-----Original Message-----
Hello,

I'm trying to write a program (dll) to use with mIRC.
mIRC wants me to use these kind of functions:

int __stdcall procname(HWND mWnd, HWND aWnd, char *data, char *parms, BOOLshow, BOOL nopause)

translated into C# code, I think it's this:

int function(int mWnd,int aWnd, char [] data, char [] parms, bool show,boolnopause)

now another problem is exporting this function so mIRC can see it. Atutorial says something about creating a DEF file, but that's probably onlyfor C++? A search on MSDN gave me this: "This requires a DLL export, which..NET Framework does not support" Does this mean I can't do this and all mywork was for nothing?

tia,
.

Nov 15 '05 #2
yes mIRC can take COM objects...
"Tu-Thach" <tu*****@yahoo. com> schreef in bericht
news:8c******** *************** *****@phx.gbl.. .
You will not be able to export dll function in C#. Maybe
mIRC will take COM objects?

Tu-Thach
-----Original Message-----
Hello,

I'm trying to write a program (dll) to use with mIRC.
mIRC wants me to use these kind of functions:

int __stdcall procname(HWND mWnd, HWND aWnd, char *data,

char *parms, BOOL
show, BOOL nopause)

translated into C# code, I think it's this:

int function(int mWnd,int aWnd, char [] data, char []

parms, bool show,bool
nopause)

now another problem is exporting this function so mIRC

can see it. A
tutorial says something about creating a DEF file, but

that's probably only
for C++? A search on MSDN gave me this: "This requires a

DLL export, which
..NET Framework does not support" Does this mean I can't

do this and all my
work was for nothing?

tia,
.

Nov 15 '05 #3
C# DLLs cannot be exported due to the underlying nature of .NET. What you
might be able to do is translate your work over to C++ and do it that way,
but as for C#, it's out.
HTH,

Bill P.
On Tue, 5 Aug 2003 14:17:20 +0200, An Ony <no*****@somewh ere.net> wrote:
Hello,

I'm trying to write a program (dll) to use with mIRC.
mIRC wants me to use these kind of functions:

int __stdcall procname(HWND mWnd, HWND aWnd, char *data, char *parms,
BOOL
show, BOOL nopause)

translated into C# code, I think it's this:

int function(int mWnd,int aWnd, char [] data, char [] parms, bool
show,bool
nopause)

now another problem is exporting this function so mIRC can see it. A
tutorial says something about creating a DEF file, but that's probably
only
for C++? A search on MSDN gave me this: "This requires a DLL export,
which
.NET Framework does not support" Does this mean I can't do this and all
my
work was for nothing?

tia,


--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 15 '05 #4
Then you can write your COM object in C# and .NET and use
it with mIRC. You still need the .NET run-time
environment in order for it to work.

Tu-Thach
-----Original Message-----
yes mIRC can take COM objects...
"Tu-Thach" <tu*****@yahoo. com> schreef in bericht
news:8c******* *************** ******@phx.gbl. ..
You will not be able to export dll function in C#. Maybe mIRC will take COM objects?

Tu-Thach
>-----Original Message-----
>Hello,
>
>I'm trying to write a program (dll) to use with mIRC.
>mIRC wants me to use these kind of functions:
>
>int __stdcall procname(HWND mWnd, HWND aWnd, char
*data, char *parms, BOOL
>show, BOOL nopause)
>
>translated into C# code, I think it's this:
>
>int function(int mWnd,int aWnd, char [] data, char []

parms, bool show,bool
>nopause)
>
>now another problem is exporting this function so mIRC

can see it. A
>tutorial says something about creating a DEF file, but

that's probably only
>for C++? A search on MSDN gave me this: "This requires
a DLL export, which
>..NET Framework does not support" Does this mean I
can't do this and all my
>work was for nothing?
>
>tia,
>
>
>.
>

.

Nov 15 '05 #5
Hmm, I come from Java and don't know C++, but will "C++ .NET" be able to
export DLL functions?

"Bill Priess" <no*****@nospam .com> schreef in bericht
news:oprtfu580v cimqky@localhos t...
C# DLLs cannot be exported due to the underlying nature of .NET. What you
might be able to do is translate your work over to C++ and do it that way,
but as for C#, it's out.
HTH,

Bill P.
On Tue, 5 Aug 2003 14:17:20 +0200, An Ony <no*****@somewh ere.net> wrote:
Hello,

I'm trying to write a program (dll) to use with mIRC.
mIRC wants me to use these kind of functions:

int __stdcall procname(HWND mWnd, HWND aWnd, char *data, char *parms,
BOOL
show, BOOL nopause)

translated into C# code, I think it's this:

int function(int mWnd,int aWnd, char [] data, char [] parms, bool
show,bool
nopause)

now another problem is exporting this function so mIRC can see it. A
tutorial says something about creating a DEF file, but that's probably
only
for C++? A search on MSDN gave me this: "This requires a DLL export,
which
.NET Framework does not support" Does this mean I can't do this and all
my
work was for nothing?

tia,


--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

Nov 15 '05 #6
Jonathan Schafer wrote:
You can use Visual Studio to create Win32 dll's that are not part of
.NET. Just make a C++ project (non-managed) and make it a dll. Then
it's just like programming C++ before .NET.


It doesn't have to be a non-managed DLL. Managed C++ DLLs can export
functions. What the OP should do is make a small Managed C++ DLLs which
exports the desired functions. These functions then just delegate their
functionality to C# classes from his original project.

(Or go the COM route)

--
Arild Fines

http://ankhsvn.tigris.org
A Visual Studio .NET Addin for the Subversion version control system.
Nov 15 '05 #7
No of course it doesn't, but it doesn't require .NET doing it the old
fashioned way. It really depends on what the environment is.

Jonathan Schafer

On Wed, 6 Aug 2003 00:33:58 +0200, "Arild Fines"
<ar*********@sh ould.not.be.her e.broadpark.no> wrote:
Jonathan Schafer wrote:
You can use Visual Studio to create Win32 dll's that are not part of
.NET. Just make a C++ project (non-managed) and make it a dll. Then
it's just like programming C++ before .NET.


It doesn't have to be a non-managed DLL. Managed C++ DLLs can export
functions. What the OP should do is make a small Managed C++ DLLs which
exports the desired functions. These functions then just delegate their
functionalit y to C# classes from his original project.

(Or go the COM route)


Nov 15 '05 #8
OK, I'm trying it the COM way, first time I tried to write a COM object.
I'm having this as code:
=============== =============== =============== ===>
....
namespace QuotesDLL
{
[Guid("53D4E200-38B0-4925-9708-A96484BAF822")]
public interface QuoteInterface
{
[DispId(1)]
bool addQuote(string quote);
[DispId(2)]
string getQuote(string [] args);
[DispId(3)]
string getQuote();
}

[Guid("F4A45909-85FE-496c-AC5D-39380B92DE23")]
public class QuoteSystem : QuoteInterface
{ ...
<============== =============== =============== =====
that's all good, right? Those methods in the interface are made public in
the implementation. Does it hurt to make other methods private? addQuote()
uses saveQuotes() and that's declared private, that's not interfering with
the whole "COM object"-idea, is it?

now I try to compile it, in debug mode all goes well, but I get:
RegAsm warning: No types were registered
Assembly exported to '...\QuotesDLL\ bin\Debug\Quote sDLL.tlb', and the type
library was registered successfully

trying to compile it in Release mode, I get a build error:
COM Interop registration failed. There are no registrable types in the built
assembly.

manual run on the debug dll:
RegAsm warning: No registry script will be produced since there are no types
to register

I've checked the registry and I can find the interfaceid, but not the class
that implements the interface.
I have no experience whatsoever with writing COM objects, so I don't know
what to do or what goes wrong.
And on final level, how do I call the COM object using mIRC? The command
works as follows:
/comopen name progid
name: some name for the connection
but what is progid in this case? QuotesDLL? QuoteSystem? QuoteInteface? The
upper hex number or the lower hex number?
thx so much!
"Tu-Thach" <tu*****@yahoo. com> schreef in bericht
news:0c******** *************** *****@phx.gbl.. .
Then you can write your COM object in C# and .NET and use
it with mIRC. You still need the .NET run-time
environment in order for it to work.

Tu-Thach
-----Original Message-----
yes mIRC can take COM objects...
"Tu-Thach" <tu*****@yahoo. com> schreef in bericht
news:8c******* *************** ******@phx.gbl. ..
You will not be able to export dll function in C#. Maybe mIRC will take COM objects?

Tu-Thach

>-----Original Message-----
>Hello,
>
>I'm trying to write a program (dll) to use with mIRC.
>mIRC wants me to use these kind of functions:
>
>int __stdcall procname(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL
>show, BOOL nopause)
>
>translated into C# code, I think it's this:
>
>int function(int mWnd,int aWnd, char [] data, char []
parms, bool show,bool
>nopause)
>
>now another problem is exporting this function so mIRC
can see it. A
>tutorial says something about creating a DEF file, but
that's probably only
>for C++? A search on MSDN gave me this: "This requires a DLL export, which
>..NET Framework does not support" Does this mean I can't do this and all my
>work was for nothing?
>
>tia,
>
>
>.
>

.

Nov 15 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1902
by: Shawn Mehaffie | last post by:
I have the following class that I've wirtten to take a Dataset and automatically export it to either XML, ASCII or Tab delimited file. The reason I wrote it they way I did was that I don't want to have o create a temporary file on the web server everytime someone want to run and export. When I call the ExportToBrowser function the user gets the standard open/save file dialog box. If the user chooses to save the file the program works...
205
10725
by: Jeremy Siek | last post by:
CALL FOR PAPERS/PARTICIPATION C++, Boost, and the Future of C++ Libraries Workshop at OOPSLA October 24-28, 2004 Vancouver, British Columbia, Canada http://tinyurl.com/4n5pf Submissions
5
11050
by: Tim Eliot | last post by:
Just wondering if anyone has hit the following issue and how you might have sorted it out. I am using the command: DoCmd.TransferText acExportMerge, , stDataSource, stFileName, True after setting stDataSource and stFileName to the desired values. Most of the time it works, but occasionally, typically as code changes are being made to the module, the following message appears:
16
11883
by: David Lauberts | last post by:
Hi Wonder if someone has some words of wisdom. I have a access 2002 form that contains 2 graph objects that overlay each other and would like to export them as a JPEG to use in a presentation. I can do this individually for each graph but this does not help me as I need both on the same JPEG. I thought I would try an export the form that contains both but I am having trouble. (My VBA is self taught and a little knowledge is...
2
3478
by: Regnab | last post by:
I've got my code working so that it'll count the number of columns in the table and move across (eg Range A-P and then range Q-W). Problem is when I get to the end of the single letters and get into AA etc. Have got an idea of how I could do it by using Chr() and having an ongoing counter which is divided by 26 when it goes past Z to work out location. However, I'd dearly like there to be an easier way. Any ideas? Another problem I'm...
0
1513
by: Shawn Mehaffie | last post by:
I have the following class that I've wirtten to take a Dataset and automatically export it to either XML, ASCII or Tab delimited file. The reason I wrote it they way I did was that I don't want to have o create a temporary file on the web server everytime someone want to run and export. When I call the ExportToBrowser function the user gets the standard open/save file dialog box. If the user chooses to save the file the program works fine,...
17
7258
by: Fabry | last post by:
Hi All, I'm new of this group and I do not know if this is the correct group for my question. I have a DLL with its export library (.lib) wrote in Borland C++ 6. In borland everything is OK and I am able to include the lib and use the class that i have exported creating an instance with new etc... I would like to export this class in microsoft VC++ using the same .lib file. Obviously it doesn' t work.
5
3444
by: JHNielson | last post by:
I have a somewhat simple question, but have been baffled by it for a while, and now I'm on a tight deadline - have to get it done within 24 hours. I am trying to export a set of files to my hard drive to then later be FTPd to a server. the file format should be "TITLE.yyyymmdd" where yymmdd is the date code for when the files are created. The files can't be .txt. But when I run the files as ".txt" the code runs just fine. when I...
5
16364
by: bhodgins | last post by:
Hi, I am new on here, and had a newbie question that I am stumped with. I am not new to access, but am new to VB. I am trying to export BLOBs from a field called photo to external jpeg files. I have tried the MS kb 210486 and successfully got the import/export to work with a sample table, but only the first record. I do not wish to impost binary data to the database, it's already there. I simply wish to pick up the binary BLOB from the photo...
3
10982
by: Wayne | last post by:
I'm trying to automate the export of a query to a text file using code. If I export the query manually I get the exact result that I want i.e. If I select the query then choose File/Export from the menu bar, choose "Text" as the save format, and then select "fixed width" as the export format, I end up with a fixed width text file with no column headers. I've tried to automate the process using: DoCmd.OutputTo acOutputQuery,...
0
9543
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10237
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7567
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6808
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5588
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4144
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.