473,395 Members | 1,774 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,395 software developers and data experts.

How to expose a function in a DLL writen by C#?

1
in C++ we could use "__declspec(dllexport)" keyword to expose a function, but How could I make A function in a class exposed to VBA(excel).
In order to call a function in a C++ DLL, I could use declare sentence, but How could I declare a reference to a C# DLL? It always throws errors: cannot find entry point xxx(function name). Could Anyone give me the keyword to expose the function in C# DLL and I will greatly appreciate !
Jul 24 '08 #1
2 3086
Curtis Rutland
3,256 Expert 2GB
Look up DllImport
that would be dll import (the l and the capital i look the same).
Jul 24 '08 #2
Plater
7,872 Expert 4TB
If you want to use your managed DLL as a COM object, you need to set the ComVisible property and I think register your DLL
Jul 24 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: sam | last post by:
I have a function writen in Perl that takes a name-value list (array) as argument and returns a name-value list (array). My question is: How to call this function from PHP and get the returned...
2
by: baumann | last post by:
hi all, i am reading the C++ templates complete guide, i have question on the following statement. We must therefore make sure the template parameters of the class template appear in the type...
3
by: msnews.microsoft.com | last post by:
Hello. Can I execute function in my code from other exe file (exe file is writen by me)? I also want pass some parameters to the function. How can I do this?
2
by: Gerard Stafleu | last post by:
I have a project with the following module: Module mdlDeclarations Public Enum getMethod gmFirst gmLast End Enum End Module and the following class:
3
by: Miguel Ferreira via .NET 247 | last post by:
Hi ! I have developed a class Library with several classes and methods. Its working fine with a windows forms test application, but now i need to create a webservice that will expose those...
2
by: GoCoogs | last post by:
I'm trying to count how many items are in a dynamic collection. This is the code I have so far. *** Begin Code *** Public Class Rule Private _rulevars As RuleVarsCollection Private _rulename...
12
by: joshuapking | last post by:
I'm having a very difficult time coming across an appropriate solution for this seemingly simple problem. I've written a managed wrapper class for some legacy C++ routines. One routine generates...
6
by: John Wright | last post by:
I ran FxCop against a program and was pleased with the security review except I get the following error: Do not indirectly expose methods How would I fix this code so this error goes away. I...
16
by: zaley | last post by:
Is there a open souce IDE writen by C( C++) or partly writen by C( C+ +)?
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.