ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage   interview questions urls   External Links  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  Dot Net  >>  Dot Net Remoting
 
 


 

 
 Dot Net Framework interview questions  Dot Net Framework Interview Questions
 Dot Net Remoting interview questions  Dot Net Remoting Interview Questions
 Dot Net WindowsForms interview questions  Dot Net WindowsForms Interview Questions
 Dot Net General interview questions  Dot Net General Interview Questions
 Dot Net AllOther interview questions  Dot Net AllOther Interview Questions
Question
How do you directly call a native function exported from a 
DLL?
 Question Submitted By :: Swechcha
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How do you directly call a native function exported from a DLL?
Answer
# 1
Yes we can call a native function exported from a Dll in 
the following way,
I used C#.Net for Coding.

Add a Namespace that "System.Runtime.InteropServices"

Then use the following code,

Syntax:
[DllImport("dllname")]
here place the function in "dllname" Dll.
 
Is This Answer Correct ?    0 Yes 0 No
Moghan
 
  Re: How do you directly call a native function exported from a DLL?
Answer
# 2
HERE IS THE CODE EXAMPLE :

using System.Runtime.InteropServices; \
class C
{
	[DllImport("user32.dll")]
	public static extern int MessageBoxA(int h, string 
m, string c, int type);
	public static int Main()
	{
		return MessageBoxA(0, “Hello 
World!”, “Caption”, 0);
	}
}
 
Is This Answer Correct ?    0 Yes 0 No
Santhanakumar
 
 
 

 
 
 
Other Dot Net Remoting Interview Questions
 
  Question Asked @ Answers
 
What are the security issues if we send a query from the application? Microsoft1
Where is global assembly cache located on the system? Value-Labs2
What?s typical about a Windows process in regards to memory allocation?  1
Threading Types ? DELL2
What is strong name and what is the purpose of strong name ? TCS3
What's the difference btw the following methods in .NET remoting? RegisterWellknownServiceType() RegisterWellknownClientType() RegisterActivatedServiceType() RegisterActivatedClientType()  1
Can you configure a .NET Remoting object via XML file?  1
Can you configure a .NET Remoting object via XML file? Tavant-Technologies1
What are the differences between Marshal by value and Marshal by reference?  2
What security measures exist for .NET Remoting in System.Runtime.Remoting?  1
What?s Singleton activation mode?  3
Where are shared assemblies stored?  2
How to register a shared assembly ? Digital-GlobalSoft1
What is the difference between private and shared assembly?  1
Which namespace is used for encryption ? Digital-GlobalSoft2
What is a process ? TCS4
What are static assemblies and dynamic assemlies. Differences between them ? TCS1
What is a strong name?  1
How does assembly versioning in .NET prevent DLL Hell? Satyam2
How do you directly call a native function exported from a DLL?  2
 
For more Dot Net Remoting Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com