Desktop Functions: Smart Device Functions:
|
Search Results for "TEST" in [All]query1: lorem30 The liquor soon mounted into their heads, as it generally does even with the arrantest topers newly landed from sea, and they began capering about most obstreperously. userenv
StringBuilder testData = new StringBuilder("");
if ((testData.Length > 0) && (*current == 0) && (current != start)) {
String data = testData.ToString();
testData.Length = 0;
testData.Append((char)*current);
Sid oSid = new Sid(@"csharp\test"); mapi324: lorem38 Capitalise on low hanging fruit to identify a ballpark value added activity to beta test. Override the digital divide with additional clickthroughs from DevOps. Nanotechnology immersion along the information highway will close the loop on focusing solely on the bottom line. icmp5: IcmpSendEcho
// != 0 can still be dest unreachable, test status further down too winfax6: lorem38 Capitalise on low hanging fruit to identify a ballpark value added activity to beta test. Override the digital divide with additional clickthroughs from DevOps. Nanotechnology immersion along the information highway will close the loop on focusing solely on the bottom line. kernel32// Tested added during 1-pass copy & paste of windows console fuctions
/// I have NOT tested interprocess attaching in .NET so dont blame me if it doesnt work! </summary>
/// I have NOT tested interprocess attaching in .NET so dont blame me if it doesnt work! </summary> 10: BackupRead
uint nNumberOfBytesToRead, out uint lpNumberOfBytesRead, bool bAbort,
Private Shared Function BackupRead(hFile As IntPtr, lpBuffer As IntPtr, nNumberOfBytesToRead As UInteger, ByRef lpNumberOfBytesRead As UInteger, bAbort As Boolean, bProcessSecurity As Boolean, _ 11: BackupWrite
uint nNumberOfBytesToWrite, out uint lpNumberOfBytesWritten, bool bAbort, 12: ConsoleFunctions This has not been tested and is provided for convenience as a roll-up of the individual console functions here on pinvoke.net into one location.
// TODO: Test - what's an out uint[] during interop? This probably isn't quite right, but provides a starting point: 13: CopyFile
long TotalBytesTransferred,
long StreamBytesTransferred,
ByVal TotalBytesTransferred As Long, ByVal StreamSize As Long, ByVal StreamBytesTransferred As Long, _
Public Function GetBytesTransfered() As Int64
GetBytesTransfered = CLng(ammountTransfered) 14: CopyFileEx
long TotalBytesTransferred,
long StreamBytesTransferred,
ByVal TotalBytesTransferred As Long, ByVal StreamSize As Long, ByVal StreamBytesTransferred As Long, _
Public Function GetBytesTransfered() As Int64
GetBytesTransfered = CLng(ammountTransfered) 15: CreateFile
/// <param name="BytesToWrite"></param>
unsafe public void Write(byte[] Buffer, int BytesToWrite, Int64 AtOffset)
ums.Write(Buffer, 0, BytesToWrite);
/// <param name="BytesToRead"></param>
unsafe public int Read(byte[] Buffer, int BytesToRead, Int64 AtOffset)
byte[] ba = new byte[BytesToRead];
return ums.Read(Buffer, 0, BytesToRead);
private static extern IntPtr MapViewOfFile(IntPtr hFileMapping, FileMapAccess dwDesiredAccess, Int32 dwFileOffsetHigh, Int32 dwFileOffsetLow, Int32 dwNumberOfBytesToMap);
internal static IntPtr MapViewOfFile(IntPtr hFileMapping, FileMapAccess dwDesiredAccess, Int64 ddFileOffset, Int32 dwNumberOfBytesToMap)
return MapViewOfFile(hFileMapping, dwDesiredAccess, Hi, Lo, dwNumberOfBytesToMap);
Int32 dwNumberOfBytesToFlush);
/// <param name="BytesToWrite"></param>
unsafe public void Write(byte[] Buffer, int BytesToWrite, Int64 AtOffset)
ums.Write(Buffer, 0, BytesToWrite);
/// <param name="BytesToRead"></param>
unsafe public int Read(byte[] Buffer, int BytesToRead, Int64 AtOffset)
byte[] ba = new byte[BytesToRead];
return ums.Read(Buffer, 0, BytesToRead);
private static extern IntPtr MapViewOfFile(IntPtr hFileMapping, FileMapAccess dwDesiredAccess, Int32 dwFileOffsetHigh, Int32 dwFileOffsetLow, Int32 dwNumberOfBytesToMap);
internal static IntPtr MapViewOfFile(IntPtr hFileMapping, FileMapAccess dwDesiredAccess, Int64 ddFileOffset, Int32 dwNumberOfBytesToMap)
return MapViewOfFile(hFileMapping, dwDesiredAccess, Hi, Lo, dwNumberOfBytesToMap);
Int32 dwNumberOfBytesToFlush); 17: CreateHardLink
CreateHardLink(@"D:\someDir\test1.txt", @"D:\someDir\test.txt",IntPtr.Zero); 18: CreateNamedPipe
/// There is a test driver class at the end of this file which can be cannibalized for sample usage code.
public class NamedPipeTest
/// Test / demo code:
NamedPipeStream stream = NamedPipeStream.Create("testpipe", NamedPipeStream.ServerMode.Bidirectional);
NamedPipeStream stream = new NamedPipeStream(@"\\.\pipe\testpipe", FileAccess.ReadWrite); 19: DefineDosDevice
VolumeFunctions.DefineDosDevice(0, @"Y:", @"c:\test\folder\name\");
@"C:\test\folder\name"); 20: DeviceIoControl
Private Sub test(ByVal VerParam As GETVERSIONOUTPARAMS, ByVal hdrive As Integer)
'Issue a Command GET VERSION and test results
test(VersionParams, hdrive)
void Test()
Class Test
IntPtr hMod = LoadLibraryEx(@"D:\Test\StringResource\Debug\StringResource.exe", IntPtr.Zero, LOAD_LIBRARY_AS_DATAFILE);
class Test
new LocaleFunctions.EnumLocalesProcExDelegate(Test.EnumLocalesProcEx);
LOCALE_SSHORTESTDAYNAME1 =0x00000060, // Shortest day name for Monday
LOCALE_SSHORTESTDAYNAME2 =0x00000061, // Shortest day name for Tuesday
LOCALE_SSHORTESTDAYNAME3 =0x00000062, // Shortest day name for Wednesday
LOCALE_SSHORTESTDAYNAME4 =0x00000063, // Shortest day name for Thursday
LOCALE_SSHORTESTDAYNAME5 =0x00000064, // Shortest day name for Friday
LOCALE_SSHORTESTDAYNAME6 =0x00000065, // Shortest day name for Saturday
LOCALE_SSHORTESTDAYNAME7 =0x00000066, // Shortest day name for Sunday class Test
new LocaleFunctions.EnumLocalesProcExDelegate(Test.EnumLocalesProcEx);
LOCALE_SSHORTESTDAYNAME1 =0x00000060, // Shortest day name for Monday
LOCALE_SSHORTESTDAYNAME2 =0x00000061, // Shortest day name for Tuesday
LOCALE_SSHORTESTDAYNAME3 =0x00000062, // Shortest day name for Wednesday
LOCALE_SSHORTESTDAYNAME4 =0x00000063, // Shortest day name for Thursday
LOCALE_SSHORTESTDAYNAME5 =0x00000064, // Shortest day name for Friday
LOCALE_SSHORTESTDAYNAME6 =0x00000065, // Shortest day name for Saturday
LOCALE_SSHORTESTDAYNAME7 =0x00000066, // Shortest day name for Sunday 25: FlushViewOfFile
uint dwNumberOfBytesToFlush); 26: GetBinaryType
[ValidateScript({Test-Path $_.FullName})] 27: GetConsoleAlias // Untested, added during 1-pass copy & paste of windows console fuctions // Untested, added during 1-pass copy & paste of windows console fuctions // Untested, added during 1-pass copy & paste of windows console fuctions // Untested, added during 1-pass copy & paste of windows console fuctions // Untested, added during 1-pass copy & paste of windows console fuctions // Untested, added during 1-pass copy & paste of windows console fuctions
// has been a while since I did this, test before use
// has been a while since I did this, test before use // Untested, added during 1-pass copy & paste of windows console fuctions // Untested, added during 1-pass copy & paste of windows console fuctions
private void cmdTest_Click(object sender, EventArgs e) // Untested, added during 1-pass copy & paste of windows console fuctions // Untested, added during 1-pass copy & paste of windows console fuctions 39: GetDateFormat
class Test {
string lpFormat, StringBuilder lpDateStr, int cchDate 40: GetLastError Tested extensively here http://stackoverflow.com/questions/17918266/winapi-getlasterror-vs-marshal-getlastwin32error 41: GetLocaleInfo
LOCALE_SSHORTESTDAYNAME1 =0x00000060, // Shortest day name for Monday
LOCALE_SSHORTESTDAYNAME2 =0x00000061, // Shortest day name for Tuesday
LOCALE_SSHORTESTDAYNAME3 =0x00000062, // Shortest day name for Wednesday
LOCALE_SSHORTESTDAYNAME4 =0x00000063, // Shortest day name for Thursday
LOCALE_SSHORTESTDAYNAME5 =0x00000064, // Shortest day name for Friday
LOCALE_SSHORTESTDAYNAME6 =0x00000065, // Shortest day name for Saturday
LOCALE_SSHORTESTDAYNAME7 =0x00000066, // Shortest day name for Sunday class Test 42: GetLocaleInfoEx
LOCALE_SSHORTESTDAYNAME1 =0x00000060, // Shortest day name for Monday
LOCALE_SSHORTESTDAYNAME2 =0x00000061, // Shortest day name for Tuesday
LOCALE_SSHORTESTDAYNAME3 =0x00000062, // Shortest day name for Wednesday
LOCALE_SSHORTESTDAYNAME4 =0x00000063, // Shortest day name for Thursday
LOCALE_SSHORTESTDAYNAME5 =0x00000064, // Shortest day name for Friday
LOCALE_SSHORTESTDAYNAME6 =0x00000065, // Shortest day name for Saturday
LOCALE_SSHORTESTDAYNAME7 =0x00000066, // Shortest day name for Sunday class Test 43: GetLocalTime
Public Sub test1()
namespace Test
out uint lpNumberOfBytesTransferred, bool bWait); Private Shared Function GetOverlappedResult(ByVal hFile As IntPtr, <[In]()> ByRef lpOverlapped As System.Threading.NativeOverlapped, ByRef lpNumberOfBytesTransferred As UInteger, ByVal bWait As Boolean) As Boolean
public static bool WriteUSB(IntPtr hDevice, byte[] pBuffer, uint dwBytesToWrite, ref uint lpNumberOfBytesWritten)
if (!WriteFile(hDevice, pBuffer, dwBytesToWrite, ref lpNumberOfBytesWritten, ref lpOverlapped) &&
uint res = GetPrivateProfileString("AppName", "KeyName", "", sb, (uint)sb.Capacity, @"c:\test.ini");
res = GetPrivateProfileString("AppName", "KeyName", "", sb, sb.Capacity, "c:\test.ini") 47: GetProcAddress for load function "Test" from DLL "MyDLL.dll" we do this codes:
typedef HRESULT (STDAPICALLTYPE * LPFNTEST) (void);
LPFNTEST _pfnTest;
_pfnTest = (LPFNTEST)::GetProcAddress(hDLL, "Test"); 48: GetShortPathName
'/// KSG Comments: This code has only been tested for .NET 2.x 49: GetSystemInfo
void Test() 50: GetTempPath
'This project references Microsoft.VisualStudio.QualityTools.UnitTestFramework
'TempFileTest.vb
Imports Microsoft.VisualStudio.TestTools.UnitTesting
'''This is a test class for TempFileTest and is intended
'''to contain all TempFileTest Unit Tests
<TestClass()> _
Public Class TempFileTest
Private testContextInstance As TestContext
'''Gets or sets the test context which provides
'''information about and functionality for the current test run.
Public Property TestContext() As TestContext
Return testContextInstance
Set(ByVal value As TestContext)
testContextInstance = value
'''A test for Create
<TestMethod()> _
Public Sub CreateTest() The VB Code was generated by the tool at http://clrinterop.codeplex.com/releases/view/14120. I believe this to be the same tool referenced at http://blogs.msdn.com/b/vbteam/archive/2008/03/14/making-pinvoke-easy.aspx. The StringBuilder limitation appears to apply to this code as well, and it will only return the first path/mountpoint found, but the method does work inside that limitation. I will post updated code as soon as I code and test. The VB Code was generated by the tool at http://clrinterop.codeplex.com/releases/view/14120. I believe this to be the same tool referenced at http://blogs.msdn.com/b/vbteam/archive/2008/03/14/making-pinvoke-easy.aspx. The StringBuilder limitation appears to apply to this code as well, and it will only return the first path/mountpoint found, but the method does work inside that limitation. I will post updated code as soon as I code and test.
Private Sub test() 54: IsProcessInJob Process - A handle to the process to be tested. The handle must have the PROCESS_QUERY_INFORMATION access right. Job - A handle to the job. If this parameter is NULL, the function tests if the process is running under any job.If this parameter is not NULL, the handle must have the JOB_OBJECT_QUERY access right. 55: LockFile
uint nNumberOfBytesToLockLow, uint nNumberOfBytesToLockHigh, 56: LockFileEx
uint nNumberOfBytesToLockLow, uint nNumberOfBytesToLockHigh, 57: LockResource
internal static int TestFindResource() 58: MapViewOfFile
UIntPtr dwNumberOfBytesToMap, IntPtr lpBaseAddress); 59: MoveFile
long TotalBytesTransferred,
long StreamBytesTransferred,
long TotalBytesTransferred,
long StreamBytesTransferred, Cut off search results after 60. Please refine your search. |