Click here to Skip to main content
15,888,968 members
Home / Discussions / C#
   

C#

 
QuestionCultureInfo question... Pin
e-laj31-Oct-05 1:51
e-laj31-Oct-05 1:51 
QuestionTreeView Getting the node the user rightclicked on Pin
tcss31-Oct-05 1:04
tcss31-Oct-05 1:04 
AnswerRe: TreeView Getting the node the user rightclicked on Pin
Robert Rohde31-Oct-05 1:30
Robert Rohde31-Oct-05 1:30 
QuestionNeed help with Regex pattern Pin
tom259731-Oct-05 0:30
tom259731-Oct-05 0:30 
QuestionPopulate hyperlink programmatically Pin
dabuskol31-Oct-05 0:22
dabuskol31-Oct-05 0:22 
AnswerRe: Populate hyperlink programmatically Pin
Guffa31-Oct-05 1:16
Guffa31-Oct-05 1:16 
Question.lib Files Pin
Andre Trollip31-Oct-05 0:12
Andre Trollip31-Oct-05 0:12 
AnswerRe: .lib Files Pin
mikanu31-Oct-05 5:09
mikanu31-Oct-05 5:09 
As far as I know there is no way to include .lib files in a C# assembly. Your assumption is right in that you have to write a quick wrapper for the .lib but there's good news: the wrapper doesn't necessarily have to be a native DLL. You could start a Managed C++ .NET Control Library project which will create a .NET assembly DLL that you would be able to reference from C#. Granted the task is not trivial if you have no experience writing C/C++ but you should be able to find some examples on the web on how to wrap a .lib in a managed assembly using Managed Extentions for C++.

Basically after you start the project you will have to do the follwing, in order to import the .lib:

In the project settings, look for Linker Options, additional include files and add your .lib file in that list (make sure to include the fully qualified path if the file doesn't reside in the project folder or in the windows folder). The next thing to do is to use #import "file_name.lib" in the header for you assembly. Doing that will make the content of the .lib accesible to your project and then you'll be able to start writing the wrapper functions. You don't have to write wrappers for all the functions in the .lib; only for those that you will be using. The part that will be a little more complex will be data marshalling between the native api and the managed assembly, but there's a ton of documentation out there on how to accomplish that.

Good luck!
Questionlistview background Pin
Annal033130-Oct-05 23:10
Annal033130-Oct-05 23:10 
AnswerRe: listview background Pin
PrakashBhaskar31-Oct-05 1:00
PrakashBhaskar31-Oct-05 1:00 
QuestionAdvanced customization in The Windows DataGridView Control Pin
Sharpoverride30-Oct-05 22:42
Sharpoverride30-Oct-05 22:42 
AnswerRe: Advanced customization in The Windows DataGridView Control Pin
mikanu31-Oct-05 5:16
mikanu31-Oct-05 5:16 
QuestionCrystal reports setup problem Pin
x-trate30-Oct-05 22:29
x-trate30-Oct-05 22:29 
QuestionAXWebBrowser Pin
PrakashBhaskar30-Oct-05 22:12
PrakashBhaskar30-Oct-05 22:12 
Questiondataset comparison Pin
dorwin30-Oct-05 21:31
dorwin30-Oct-05 21:31 
QuestionHelp me with web service! Pin
Duong Tien Nam30-Oct-05 16:56
Duong Tien Nam30-Oct-05 16:56 
AnswerRe: Help me with web service! Pin
codet30-Oct-05 17:32
codet30-Oct-05 17:32 
GeneralRe: Help me with web service! Pin
Duong Tien Nam30-Oct-05 19:11
Duong Tien Nam30-Oct-05 19:11 
Questionmasking for C1 TrueDBgrid column Pin
deep730-Oct-05 16:55
deep730-Oct-05 16:55 
QuestionMaking a Preferences Dialog like Visual Studios 'Options' Dialog? Pin
signbit30-Oct-05 15:28
signbit30-Oct-05 15:28 
AnswerRe: Making a Preferences Dialog like Visual Studios 'Options' Dialog? Pin
Christian Graus30-Oct-05 15:56
protectorChristian Graus30-Oct-05 15:56 
General[Message Deleted] Pin
signbit30-Oct-05 16:06
signbit30-Oct-05 16:06 
GeneralRe: Making a Preferences Dialog like Visual Studios 'Options' Dialog? Pin
Christian Graus30-Oct-05 16:08
protectorChristian Graus30-Oct-05 16:08 
GeneralRe: Making a Preferences Dialog like Visual Studios 'Options' Dialog? Pin
signbit30-Oct-05 16:09
signbit30-Oct-05 16:09 
GeneralRe: Making a Preferences Dialog like Visual Studios 'Options' Dialog? Pin
Christian Graus30-Oct-05 16:11
protectorChristian Graus30-Oct-05 16:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.