Click here to Skip to main content
15,892,927 members
Home / Discussions / C#
   

C#

 
AnswerRe: WMI Pin
moein.serpico11-Sep-09 0:29
moein.serpico11-Sep-09 0:29 
GeneralRe: WMI Pin
Henry Minute11-Sep-09 0:34
Henry Minute11-Sep-09 0:34 
AnswerRe: WMI Pin
moein.serpico11-Sep-09 0:38
moein.serpico11-Sep-09 0:38 
GeneralRe: WMI Pin
Henry Minute11-Sep-09 0:47
Henry Minute11-Sep-09 0:47 
GeneralRe: WMI Pin
moein.serpico11-Sep-09 1:52
moein.serpico11-Sep-09 1:52 
GeneralRe: WMI Pin
stancrm11-Sep-09 0:36
stancrm11-Sep-09 0:36 
GeneralRe: WMI Pin
Dave Kreskowiak11-Sep-09 4:19
mveDave Kreskowiak11-Sep-09 4:19 
Questionproblems about how to cancel auto play from an application Pin
smilefishcc10-Sep-09 23:45
smilefishcc10-Sep-09 23:45 
I am developing an application to play DVD. however When i insert a disk, Windows will automatically try to open that disk either in an explorer window or ask the user what to do with the disk. Then I search in the internet and find two approaches.
The first and simplest is to register the special Windows message "QueryCancelAutoPlay" and simply return 1 when the message is handled. This only works for the current window, and not a background application.

The second approach requires inserting an object that implements the COM interface IQueryCancelAutoPlay COM interface into the Running Object Table.

I used the first one. But sometimes two messages of "QueryCancelAutoPlay" are received and the autoplay window appears again. Here is my code of cancel auto play. Sometimes one message of "QueryCancelAutoPlay" is received and the autoplay window doesn't appear. Sometimes no message of "QueryCancelAutoPlay" is received and the autoplay window appear again.

here is my code of cancel the autoplay window.

IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
{
if (g_uQueryCancelAutoPlay == 0)
{
g_uQueryCancelAutoPlay = RegisterWindowMessage("QueryCancelAutoPlay");
}
if (g_uQueryCancelAutoPlay != 0 && (uint)msg == g_uQueryCancelAutoPlay)
{
System.Windows.MessageBox.Show("QueryCancelAutoPlay1"); //Sometime it appears twice, sometimes it doesn't appear
return (IntPtr)1;
}
return IntPtr.Zero;
}
AnswerRe: problems about how to cancel auto play from an application Pin
stancrm10-Sep-09 23:48
stancrm10-Sep-09 23:48 
QuestionRe: problems about how to cancel auto play from an application [modified] Pin
smilefishcc11-Sep-09 0:17
smilefishcc11-Sep-09 0:17 
QuestionNetwork speed limitation Pin
DeOiD10-Sep-09 23:43
DeOiD10-Sep-09 23:43 
QuestionCasting byte arrays to structures in C# [modified] Pin
User 571134810-Sep-09 23:29
User 571134810-Sep-09 23:29 
AnswerRe: Casting byte arrays to structures in C# Pin
Luc Pattyn10-Sep-09 23:38
sitebuilderLuc Pattyn10-Sep-09 23:38 
AnswerRe: Casting byte arrays to structures in C# Pin
PIEBALDconsult11-Sep-09 4:30
mvePIEBALDconsult11-Sep-09 4:30 
QuestionCrystal report subreport error... Pin
The_Collector10-Sep-09 23:21
The_Collector10-Sep-09 23:21 
AnswerRe: Crystal report subreport error... Pin
CoderForEver13-Sep-09 0:48
CoderForEver13-Sep-09 0:48 
GeneralRe: Crystal report subreport error... Pin
The_Collector13-Sep-09 16:46
The_Collector13-Sep-09 16:46 
Questionproblem in deployment Pin
gtag10-Sep-09 22:10
gtag10-Sep-09 22:10 
AnswerRe: problem in deployment Pin
minnie mouse11-Sep-09 16:59
minnie mouse11-Sep-09 16:59 
QuestionHow to connect to a website and retrieve the page in C#? Pin
sheateng10-Sep-09 22:00
sheateng10-Sep-09 22:00 
AnswerRe: How to connect to a website and retrieve the page in C#? Pin
Md. Marufuzzaman10-Sep-09 22:17
professionalMd. Marufuzzaman10-Sep-09 22:17 
AnswerRe: How to connect to a website and retrieve the page in C#? Pin
vivasaayi11-Sep-09 0:53
vivasaayi11-Sep-09 0:53 
GeneralRe: How to connect to a website and retrieve the page in C#? Pin
sheateng27-Sep-09 21:43
sheateng27-Sep-09 21:43 
GeneralRe: How to connect to a website and retrieve the page in C#? Pin
vivasaayi28-Sep-09 3:52
vivasaayi28-Sep-09 3:52 
AnswerRe: How to connect to a website and retrieve the page in C#? [modified] Pin
April Fans21-Sep-09 17:09
April Fans21-Sep-09 17:09 

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.