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

calling a shell32 function from C#

Any tutorials / samples on how to call a shell32,user, kernel function from C#

thanks,

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>ggZviDuAt0+dTZLvBvWX5A==</Id>
Nov 17 '05 #1
2 7499
You should pinovke the function ,

This is the example from http://www.gotdotnet.com which calls MessageBox
function from User32.dll

HTH

-----------------------------------------

using System.Runtime.InteropServices;

public class Win32 {
...
[DllImport("User32.dll", EntryPoint="MessageBox",
CharSet=CharSet.Auto)]
public static extern int MsgBox(int hWnd, String text, String
caption, uint type);
}

public class TestPInvoke {
public static void Main() {
...
String date = ...;

Win32.MsgBox(0, date, "PInvoke Sample", 0);
}
}
"vikram Nayak via .NET 247" wrote:
Any tutorials / samples on how to call a shell32,user, kernel function from C#

thanks,

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>ggZviDuAt0+dTZLvBvWX5A==</Id>

Nov 17 '05 #2
You can usually find the p/invoke that you're looking for here.
http://www.pinvoke.net/

If not, you can always add it once you've written and tested it. It's a
wiki.

--
Tim Wilson
..Net Compact Framework MVP

"vikram Nayak via .NET 247" <an*******@dotnet247.com> wrote in message
news:eF*************@TK2MSFTNGP12.phx.gbl...
Any tutorials / samples on how to call a shell32,user, kernel function from C#
thanks,

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>ggZviDuAt0+dTZLvBvWX5A==</Id>

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: kurotsuke | last post by:
Can anybody tell me how I can call the Pick Icon Dialog from C#? I couldn't find any example. Thanks.
2
by: Craig | last post by:
I've seen many examples of how to call SHGetFileInfo in shell32.dll to get a files associated icon, but I can't find anywhere how to get the file information (size, last date modified, etc, etc)...
11
by: j23 | last post by:
I have library (static) testlib.cpp: #include <stdarg.h> void xxx(...) { char buf; va_list args; va_start(args, buf); va_end(args); }
3
by: Just Me | last post by:
I've referenced the shell32.dll but can't seen to use it. Could someone give an example of using any function in it? Something like: Dim ShellQAs New Shell32.ShellClass Dim shellFolder...
0
by: Steve Mauldin | last post by:
I am trying to get from files the keywords saved as part of the properties under the summary tab. I am able to get the Title, and Comments using the following code but I need to get the keywords...
0
by: Steve Mauldin | last post by:
I am trying to get from files the keywords saved as part of the properties under the summary tab. I am able to get the Title, and Comments using the following code but I need to get the keywords...
1
by: Zairay | last post by:
Hi All, I'm having a problem with the Shell32.dll when I try to open a program from my Access db. When I try to open a program called FalconViewLite from my access database I get an error in...
0
by: Eran.Yasso | last post by:
Hi all, The following code sets/disables network adpter's status. Since I have no idea where to put this code and I wish to share the community with it. I did rverse engineering from VBS to C#....
5
by: progvar | last post by:
Hi, i want to know how to unzip a zip file and extract the files to a particular location please help me thanks in advance varinder
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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: 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
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...
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...

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.