mfc >> DLL newbie

by Abelardo Vacca » Sun, 23 Nov 2003 11:12:40 GMT

Hello,

I'm kind of lost here. I usually work on VB, where
creating DLLs and adding to another project as Reference
is child's play.

I'm trying to achieve the same thing using VC++ .NET.
So far, the closest thing I have found are MFC DLLs
projects.

As youcan see, I'm pretty much nowhere. I've tried the
MSDN documentation but I can find a reference, how to,
simple enough to get me started.

Is there any documentation on creating and using DLLs on
VC++ .NET that some one could point out for me.

Thanks a lot.


mfc >> DLL newbie

by Ajay Kalra » Sun, 23 Nov 2003 19:42:08 GMT


Assuming you are talking about unmanaged world in .Net, following will be helpful. There
are several types of DLLs, including Win32, MFC(regular and extension) etc. But the
concept is the same.

http://www.flipcode.com/tutorials/tut_dll01.shtml


--
Ajay Kalra [MVP - VC++]
XXXX@XXXXX.COM




| Hello,
|
| I'm kind of lost here. I usually work on VB, where
| creating DLLs and adding to another project as Reference
| is child's play.
|
| I'm trying to achieve the same thing using VC++ .NET.
| So far, the closest thing I have found are MFC DLLs
| projects.
|
| As youcan see, I'm pretty much nowhere. I've tried the
| MSDN documentation but I can find a reference, how to,
| simple enough to get me started.
|
| Is there any documentation on creating and using DLLs on
| VC++ .NET that some one could point out for me.
|
| Thanks a lot.




Similar Threads

1. DLL newbie: Create C++ dll for VBA/Office apps

First off, let me say that I did some Googling last night and didn't 
find many (decent) references.  My situation: I've been writing Qt/C++ 
windows apps for a few years, now I want to bring some of my classes 
over to use in VBA (Excel 2000/2002) (without rewriting them, of 
course).  I'm using VS 7.0, btw.

My question:  Where to begin?  All of the code in the classes I want to 
export are vanilla C++ (no Qt or MS-specific references).  Most of the 
references/tutorials I've found online are years old (for MSVC 5 or 6), 
some say you need to create an ATL project, some MFC.  Some say you must 
have a .DEF file, some not.

I would really appreciate a few pointers on getting started, even if 
those pointers are to references/readings.

Thanks much,
Michael

2. ATL COM Server instantiated from ATL Dll (Newbie Question)

3. Reg DLL using shared MFC DLL Question (newbie)

I have a Reg DLL that is exporting an entire class. I am using runtime
dynamic linking.

The DLL implements the InitInstance function. Inside the InitInstance
function I would like to throw an exception. (the exception is to
indicate an error in the initialization of this dll) I am trying to
use the InitInstance function to initialize some hardware ports that
will be used and controled by mutexes.

The question is in the client program (a dialog program that links the
dll's .lib at runtime) where do I try to catch that exception? Can I
catch that exception?

If the program cannot catch that exception is there a way to indicate
that the initial dll failed part of it's initialization?

Thanks for the Help 

If this is the wrong place to post this please tell me.

4. newbie thats needs a little help with a dll issue - CSharp/C#

5. NEWBIE: Accessing DLL with P/Invoke

Hello,

My apologies for my overtly NEWBIE question.  I am a long time C
programmer on various UNIX platforms.  I have decided to try my hand at
Microsoft and thought I would try to learn C#.

My project involves accessing an API whish was written in C and
compiled using Visual Studio 6 as an ordinary (old style) DLL.  I have
been provided the DLL and corresponding header files.

My project is being developed under Visual C# Express 2005 Beta 2 and I
am relying on the P/Invoke funcationality.

I believe I have correctly created all of the definitions following the
DllImport() rules (including the "unsafe" modifier, etc).

I am able to make function calls to the DLL (I think!) but the function
call is returning an "unknown network error." (I know this because I
have a list of error codes in one of the header files.)

This got me thinking, what happens when that DLL makes another external
function call?  In this case, the DLL is using the IP stack of the OS
to communicate a proprietary protocol with an off-site box (which I
cannot access directly).

If I compile this as a ".NET" application, then does that not mean that
all functions (including IP stack) must go through the .NET VM (forgot
what it's called)?  Or should access to the IP stack from "old style"
DLLs work anyway?

Any help here is appreciated.  Please email me directly or cc: me with
responses.

Thanks!

Michael

6. Newbie Question: Better to complie classes into dlls? - CSharp/C#

7. Newbie Question about C# Dll's

I'm very new to C#.  I've been using VC++ for a number of years.  I want to 
create a dll in C# .Net and use a few functions in it in an MFC based VC++ 
app.

Can someone give me pointers, either towards some easy tutorials, or if the 
instructions are simple enough go ahead and just respons with them.

Thanks in advance,
ed

8. VB newbie to C# - DLL Reference problem - CSharp/C#