Desktop Functions: Smart Device Functions:
|
Search Results for "code" in [All]powrprofSample Code:Sample Code:Sample Code:Sample Code:Sample Code:Sample Code:Sample Code:Sample Code:Sample Code:Sample Code:Sample Code:Sample Code:12: PowerEnumerate Sample Code:
uint ReturnCode = 0;
while (ReturnCode == 0)
ReturnCode = PowerEnumerate(IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, PowerDataAccessor.ACCESS_SCHEME, Index, ReadBuffer, ref BufferSize);
if (ReturnCode == 259) break; // no more data
if (ReturnCode != 0)
throw new COMException("Error occurred while enumerating power schemes. Win32 error code: " + ReturnCode); Sample Code:
throw new Exception("Error reading current power scheme. Native Win32 error code = " + res);
''' Retrieves the friendly name for the specified power setting, subgroup, or scheme, in Unicode (Each Char is 2 bytes). Sample Code:
throw new Exception("Error reading current power scheme. Native Win32 error code = " + res); Sample Code:Sample Code:Sample Code:
[DllImport("powrprof.dll", SetLastError=true, CharSet=CharSet.Unicode)] Sample Code:
uint BufferSize = (uint)System.Text.ASCIIEncoding.Unicode.GetByteCount(name); 19: QueryFlags Sample Code:Sample Code:Sample Code:22: ReadPwrScheme Sample Code:Sample Code:24: SetSuspendState Sample Code:25: wetrewrt Sample Code:Sample Code:iprop27: PropVariantClear
[DllImport("iprop.dll", SetLastError=true, CharSet=CharSet.Unicode)] Sample Code:rpcrt428: UuidCreate Sample Code:29: UuidCreate Sample Code in C#:Sample Code in VB:
Dim code As Integer
code = UuidCreateSequential(myId)
If code <> 0 Then
Console.WriteLine("UuidCreateSequential failed: {0}", code) Sample Code in C#:Sample Code in VB:
Dim code As Integer
code = UuidCreateSequential(myId)
If code <> 0 Then
Console.WriteLine("UuidCreateSequential failed: {0}", code) 31: UuidFromStringA There is an Unicode version call UuidFromStringW Sample Code:winhttpSample Code:Sample Code:34: WinHttpConnect Sample Code:Sample Code:
/// <param name="lpcwszUrl">A pointer to a null-terminated Unicode string that contains the URL of the HTTP request that the application is preparing to send.</param>
[DllImport("winhttp.dll", SetLastError = true, CharSet = CharSet.Unicode)] Possible error codes include the folllowing: Error Code - Description ERROR_WINHTTP_BAD_AUTO_PROXY_SCRIPT - An error occurred executing the script code in the Proxy Auto-Configuration (PAC) file. ERROR_NOT_ENOUGH_MEMORY - Not enough memory was available to complete the requested operation. (Windows error code) Sample Code:37: WinHttpOpen
NULL_CODEPAGE = 0x00000008, Sample Code:Sample Code:I tested this method in sync method, it is ok. But according to MSDN and C++ code, the second param should be NULL when use async method. This function cann't work. Sample Code:Sample Code:Sample Code:42: WinHttpReadData Sample Code:Sample Code:Sample Code:45: WinHttpSetOption Sample Code:Sample Code:47: WinHttpWriteData Sample Code:Sample Code:mqrtSample Code:Sample Code:I can share more of the code if people are interested, but there are lots of API calls leading up to the call to MQSetQueueSecurity, so I'll just show the interesting parts here: icmp51: IcmpCloseHandle Sample Code:52: IcmpCreateFile Sample Code:53: IcmpSendEcho Sample Code:Complete "simple sample Sample code tiny c OR gcc Cygwin:imm3254: ImmConfigureIME Sample Code:[DllImport("imm32.dll", CharSet=CharSet.Unicode)] Sample Code:[DllImport("imm32.dll", CharSet=CharSet.Unicode)] 56: ImmGetContext Sample Code:Sample Code:Sample Code:avifil32Sample Code:Sample Code:Cut off search results after 60. Please refine your search. |