Re: Simple Managed DLL Creation
From: Mark Prenter (sorry_at_toomuchspam.com)
Date: 07/13/04
- Next message: Joachim: "Catching a key pressed event in a CComboBox"
- Previous message: PaulW_at_community.nospam: "Indexed Properties in Visual Studio.NET 2005 beta."
- In reply to: Ronald Laeremans [MSFT]: "Re: Simple Managed DLL Creation"
- Next in thread: Ronald Laeremans [MSFT]: "Re: Simple Managed DLL Creation"
- Reply: Ronald Laeremans [MSFT]: "Re: Simple Managed DLL Creation"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 13 Jul 2004 10:26:10 -0700
Thanks for the reply. I'm only somewhat familiar with the "static" keyword.
I understand that if I declare a VARIABLE static, there will only be one
instance for a library. So it could be used for keeping an employee count,
for example. But that's static variables, and I'm worried about static
functions or methods...
Are there any "gotcha's" when dealing with static methods? Are variables
used inside the static method automatically static as well? Does that cause
problems if two programs happen to use the same method out of the DLL at the
same time?
Thanks,
/\/\ark
"Ronald Laeremans [MSFT]" <ronaldl@online.microsoft.com> wrote in message
news:%23%23xW9HHaEHA.3708@TK2MSFTNGP10.phx.gbl...
> Use static members of a class instead.
>
> Ronald Laeremans
> Visual C++ team
>
> "Hasani (remove nospam from address)" <hblackwell@n0sp4m.popstick.com>
wrote
> in message news:ut8eo1FaEHA.3420@TK2MSFTNGP12.phx.gbl...
> > They're called global functions in c++
> > they're different than static.
> >
> > http://c.ittoolbox.com/documents/document.asp?i=1596
> >
> > If you were to reference this dll in .net, I doubt a global or static
> > methods will show up though, I did create a project a few months back in
> > managed c++ that used atl and when i referenced it in .net, it listed
> > structures that were not contained in a namespace, but those were
> > structures
> > and not methods.
> >
> > "Mark Prenter" <sorry@toomuchspam.com> wrote in message
> > news:%23rElFNFaEHA.3476@tk2msftngp13.phx.gbl...
> >> Hi all, I'm fairly new to .NET and I haven't done much in C++ before,
> >> nothing complex anyway, but I have a pretty good understanding of
> >> programming in general.
> >>
> >> What I'm trying to do is create a .DLL that contains a lot of the
> > functions
> >> and classes that I normally use. I've followed the examples from
> >> http://www.c-sharpcorner.com/2/pr12.asp which contains a pretty good
> > example
> >> of creating a simple .DLL. Even though the example is in C#, it was
> > pretty
> >> easy to translate into C++ .NET.
> >>
> >> And here's the question : I was able to create a simple DLL which
> > contains
> >> classes, but I have not figured out how to include simple functions.
Is
> > it
> >> possible to have functions in a DLL that aren't associated with any
> >> particular class or object? "Simple" functions, as I call them?
> >>
> >> Thanks,
> >> /\/\ark
> >>
> >>
> >
> >
>
>
- Next message: Joachim: "Catching a key pressed event in a CComboBox"
- Previous message: PaulW_at_community.nospam: "Indexed Properties in Visual Studio.NET 2005 beta."
- In reply to: Ronald Laeremans [MSFT]: "Re: Simple Managed DLL Creation"
- Next in thread: Ronald Laeremans [MSFT]: "Re: Simple Managed DLL Creation"
- Reply: Ronald Laeremans [MSFT]: "Re: Simple Managed DLL Creation"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|