473,387 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 1437
> 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**********************@hotmail.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
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...
1
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...
1
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...
1
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...
4
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. ...
3
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...
7
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...
3
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...
7
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...
4
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.