Skip to main content

Posts

Showing posts with the label Win32

CreateProcess() - Waiting for CreateProcess to finish.

CreateProcess() :   Creates a new process and its primary thread. The new process runs in the security context of the calling process. If the calling process is impersonating another user, the new process uses the token for the calling process, not the impersonation token. To run the new process in the security context of the user represented by the impersonation token, use the CreateProcessAsUser or CreateProcessWithLogonW function. Primary focus of this post is going to be waiting for CreateProcess() to finish. I have seen in many situations developer wants to start a external binary and this task can be accomplished by using CreateProcess() API. What happens after starting this process ?  We will not have control over this newly running application/binary, that is expected however at times we want to wait till it completes it execution.  How do achieve that ? It is not rocket science it in fact is pretty simple.  // Create the process PROCESS_INFORMATION pi; ...

Writing Your own GPS application for Windows Mobile using .NET C# OR Visual C++ - Part 1 Introduction

Hello Folks!!!! As promised here I am with writing your own GPS Application … Part1. So let us see what the heck GPS is? I remember old saying “You should think that opposite person is layman or dumb while explaining something otherwise your lecture may not reach 100% audience”. I love this concept and try to apply whenever I am explaining to others (At times experience people may be bored with simple concepts but nevertheless I wanted to target dumbest person. Introduction: Our ancestors had to go to pretty extreme measures to keep from getting lost. They erected monumental landmarks, laboriously drafted detailed maps and learned to read the stars in the night sky. They are simply awesome and GREAT!!!! Imagine driving to an important meeting with girl friend and realizing that you're lost. (Ohhh god, please give me enough strength to face her and take the heat from her J ). Your first impulse would probably be to call her and ask for directions (If she is really familiar with the...