Geeks With Blogs

News
WinToolZone - Spelunking Microsoft Technologies
I work as a developer on the Common Language Runtime (CLR) team, specifically in the areas of exception handling and CLR hosting.
Disclaimer

The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Inappropriate comments will be deleted at the authors discretion. All code samples are provided "AS IS" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

Inside and Out... An attempt to understand technology better... February 2005 Entries
Download CERapi - the managed Windows CE Remote API
Windows CE Remote API (RAPI) is the mechanism via which desktop applications can talk with the Windows CE device over ActiveSync connection. However, since RAPI is not supported natively for managed code development, I have been working on an implementation for managed code, CERapi. You can download CERapi from http://www.wintoolzone.com/... It comes with complete documentation, examples and currently supports: 1) Retrieving device and OS information 2) Retrieving Battery ......

Posted On Thursday, February 24, 2005 9:54 AM

Global Memory and Battery Status Support in CERapi
I just finished implementing support for getting the global memory details and the battery charge details in CERapi - my managed RAPI implementation. To get these details, simply obtain the CESystemInformation instance and use the GlobalMemoryInformation and BatteryInformation properties to get the details, as shown in the code snippet below (si, in the snippet below, is reference to CESystemInformation object): // Global Memory Details CEGlobalMemory gm = si.GlobalMemoryInformation; Console.WriteLine("Memory ......

Posted On Tuesday, February 15, 2005 7:22 PM

C# "internal" for managed C++
C# has the internal keyword that allows one to define types that are publicly available within the assembly but private outside it - implying that external assemblies cannot see them. If you want the same to be done in managed extensions for C++, use the public private: access specifier as shown below: public __gc class MyClass { private: int a; public private: MyClass() { // do some work } public: void SomeMethod(void) { // some work done } }; In the snippet above, the constructor is functionally ......

Posted On Tuesday, February 15, 2005 2:39 PM

Welcome Windows CE Remote API (RAPI) to the managed world
At the last Mobile and Embedded DevCon held at Bangalore, India, I spoke about the Windows CE Remote API, better known as RAPI.RAPI is currently not available in the .NET Framework. To alleviate this issue, I have started working on a managed RAPI to get the functionality in the managed world - following is how the code looks like: CERapi rapi = new CERapi(); if (rapi.Init(5000) != InitReturnCode.Success) Console.WriteLine("Unable to initialize RAPI"); else { Console.WriteLine("Initialized RAPI"); ......

Posted On Tuesday, February 15, 2005 10:11 AM

Managed code impersonation: CLR ThreadPool and more...
Under managed code, once you impersonate your application's thread using LogonUser and WindowsIdentity class's Impersonate method, you can go ahead and perform tasks using the impersonated thread as you require. However, there are couple of catches to this:1) If you launch a process using Process.Start method, the launched process will not execute under the impersonation context of your application. If you want to make that happen, you will have to launch the process using CreateProcessWithLogonW ......

Posted On Wednesday, February 9, 2005 11:43 AM

Managed CreateProcessWithLogonW
I returned this past weekend after a family function. It had me very busy and thus, no blogging for sometime for me :) That said, today I was working with one of my friends over email - she was stuck about getting to launch a process in a specific user context, using managed code. Since the .NET Framework doesn't support such functionality out of the box, we tried different ways to do this: 1) LogonUser followed by WindowsIdentity impersonation using the obtained token - the token wasn't getting ......

Posted On Wednesday, February 9, 2005 9:38 AM

Copyright © Gaurav Khanna | Powered by: GeeksWithBlogs.net