473,401 Members | 2,125 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,401 software developers and data experts.

what is DllImport

1
Hello.
I want to know deeply what does the statement below means:
.................................................. .................................................. ............
[DllImport("PrmConnect.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "OpenConnect", ExactSpelling = true, CharSet = CharSet.Ansi)]

public static extern int OpenConnect(int nComType, [MarshalAs(UnmanagedType.LPStr)] String Param);

.................................................. .................................................. .........

mean first why we use DLLImport?

Second what is CallingConvention for?

third why it is not possible to add a reference to "PrmConnect.dll" from Reference folder in solution explorer ?

forth what is the use of EntryPoint and ExactSpelling and CharSet?

fifth why here it is written the OpenConnect with extern and also what does
" [MarshalAs(UnmanagedType.LPStr)] String Param " means?
Plz Help guys.
Mar 12 '08 #1
1 1630
debasisdas
8,127 Expert 4TB
Please find a related article here .
Mar 12 '08 #2

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

Similar topics

15
by: Jim | last post by:
I am extremely frustrated. I am building c# application for a call center and am using a third party API to access some hardware. When develop and test my class using the windows console the...
4
by: James | last post by:
Greetings, I have a PowerBasic unmanaged library that I wish to call from C#. Here's the PB code... FUNCTION Hello(str AS STRING) EXPORT AS STRING FUNCTION = "Hello World " & str END...
2
by: Al Bahr | last post by:
H I am try to convert C# to vb.net I don’t know what would be an equivalent statements in VB.net any help will be appreciated. bmiColors ' RGBQUAD structs... Blue-Green-Red-Reserved, repeat.....
9
by: Ole Christensen | last post by:
I'm trying to make a sort of conditional compilation in my C# code because my app is intended to run on both a Pocket PC and on a normal desktop PC. My code uses a call to an API function that on...
2
by: k | last post by:
Hiya, I'm hoping somebody can help me out here, I have searched for this problem but had no joy in finding a solution. I'm trying to use the DllImport attribute as follows: I have...
0
by: kathy | last post by:
I try to call a DLL function in my C++ application using VC++.NET. The following code failed: public: static int MyAdd1(int i,int j); static int MyAdd2(MyData d); private:
2
by: Brian Anderson | last post by:
Hello, is it possible to use DllImport to call a DLL in ASP.NET ? Or is it necessarry that my DLL has to be copied into \System32 ? My DLL is a native C++ 7.1 DLL (not managed, no COM, no...
2
by: Ed | last post by:
Hello, dear all, I often see these two import usage in the code. Both are the interface to use the Dll library. I think they are the same. Normally P/Invoke means using the to import the dll....
14
by: Mohamed Mansour | last post by:
Hey there, this will be somewhat a long post, but any response is appreciated! I have done many PInvoke in the past from C++ to C#, but I did PInvoke within C# not C++/CLI. Can someone explain...
9
by: jjones7947 | last post by:
Am doing a JNI wrap on a C++ API, am using VC7 and Eclipse. In preparation, I created a C++ executable which mimicked the flow of the JNI, i.e. a driver file which called methods in file with methods...
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: 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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
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...
0
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...

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.