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

Home Posts Topics Members FAQ

CLR Class Libary

Can anyone tell me how to write a CLR Class Library (C++/CLI DLL)

I have declared my class in .h file as

namespace Test
{
public ref class TestFunctions
{
public:
static bool Function1( );
}
}

and my .cpp file is
namespace Test
{
bool TestFunctions:: Function1()
{
bool bRet = false;
return bRet;
}
}

Is this the best way to write a dll using C++/CLI.
I am declaring the functions as static so that I can use them directly from
my application.

Thanks,
-Asfar
Mar 1 '06 #1
1 1451
> Can anyone tell me how to write a CLR Class Library (C++/CLI DLL)

I have declared my class in .h file as

namespace Test
{
public ref class TestFunctions
{
public:
static bool Function1( );
}
}

and my .cpp file is
namespace Test
{
bool TestFunctions:: Function1()
{
bool bRet = false;
return bRet;
}
}

Is this the best way to write a dll using C++/CLI.
I am declaring the functions as static so that I can use them directly
from my application.


Hi,

Another possibility is to implement the class completely in your .h file,
just like WinForms are implemented in VC++.
It is not the default C++ way, but you'll see the same style in C# where
there are no separate declaration and implementation.

--

Kind regards,
Bruno.
br************* *********@hotma il.com
Remove only "_nos_pam"
Mar 1 '06 #2

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

Similar topics

4
6745
by: C-Sharper or C-Hasher, one of the two | last post by:
Hi, I have a C# class libary (Class1) which is inherited by another class in a Windows Forms app. I want this other class to implement some, but not all of the features of the base class. How can I completely hide (within the IDE) the members of the base class library i.e. only expose those members that I want exposed? I've tried some methods gleaned by googling for "hiding base class members" which suggested using things like "new" and...
1
1698
by: Roger Gordon | last post by:
I have the VB.NET Standard Edition. I'm taking a VB.NET class in school. Last night we tried to create a class libary and there was no option to do this in the Standard Edition. Our instructor has Visual Studio.NET and so he does have the option to create a class libary. Does anyone know if there is a way to create a class libary in VB.NET Standard Edition, or do I need to go out and buy Visual Studio.NET?
1
1992
by: Ron | last post by:
Hello, I need to create/instantiate a global class library project so that 2 EXE's can write to the same class library form in the same instance of the class libary. I am thinking something along the lines of declaring the class library project in a global assembly and then referencing this global declaration from each of the 2 EXE's. Is the global assembly where I could declare my global class libary project? How to do that?
1
1386
by: Tom Edelbrok | last post by:
I am creating a class libary of VB.Net utilities that will be built into a DLL. This DLL can be used by our development VB.NET programs when they want to call standard in-house utilities. I create the class libary MYCLASSLIBRARY.VB by inserting a whole bunch of classes, ie: public class class1 end class public class class2
4
1526
by: David McCallum | last post by:
First excuse my ignorance, but I'm completely new to VS2005 development I've created a new project and want to add an already written class stored elsewhere on the computer to the project. This class will be used by a number of projects. The problem is, if I right-click on the Project File in the Solution Explorer and add the class a copy of the class is placed in the projects folder. Any changes to the original class do seem to be...
3
2201
by: Rich | last post by:
I put together a simple test class libary (VB2005) with one class and one function that takes an integer argument and adds 10 the argument and returns that number. Then I created a simple VB2005 app to test my class library function. I made a reference to testClassLib.dll in the new project. Then I made a function calls in a button sub and wrote the results to the console. This worked fine. Now I am trying to add a reference to a...
7
10324
by: Peter Bradley | last post by:
OK. A bit behind the times, I know; but we're just moving over to .NET 2.0. How on earth do you manage configuration settings in a class library in .NET 2.0? In version 1.1, we used a handy class called AssemblySettings that someone (I forget his name) had written. When the class library was finished, you deployed it to the GAC and put the configuration files in the GAC with the class library assembly. This no longer works. In fact...
3
1326
by: Jacob | last post by:
Hi! Where do i find .NET class libary in Visual studio? I mean if you would like to browse through the classes and members. Or if you want to search fr specific classes or members. Thanks in advance. Jacob
7
1146
by: patr0805 | last post by:
Here is what I want it to do: 1: My form uses my class library dll to use a command called moveobject 2: My form sends button1 to the byval 3: The button on the form is moving Here is what it does right now: 1: My form uses my class library dll to use a command called moveobject 2: My form sends button1 to the byval 3: Returning an error
4
1783
by: vedrandekovic | last post by:
Hello, Does anybody have any idea how can I embed my modules to libary.zip and use it from my application.For example if user write this code in my TextEntry ( or something like that, textentry is created with wxpython ) : import d3dx # directpython module frame=d3dx.Frame(u"My frame") # create frame frame.Mainloop() # run it
0
9688
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9546
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,...
0
10268
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10247
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,...
0
10031
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7571
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
6809
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
5593
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4146
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

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.