c# Programming Glossary: marshal.structuretoptr
How to use filegroupdescriptor to drag file to explorer c# http://stackoverflow.com/questions/1845654/how-to-use-filegroupdescriptor-to-drag-file-to-explorer-c-sharp fileDescriptorByteArray new Byte fileDescriptorSize try Marshal.StructureToPtr fileDescriptor fileDescriptorPointer true Marshal.Copy fileDescriptorPointer..
Changing master volume level http://stackoverflow.com/questions/294292/changing-master-volume-level int mcd.paDetails Marshal.AllocHGlobal int mcd.cbDetails Marshal.StructureToPtr volume mcd.paDetails false mixerSetControlDetails IntPtr.Zero..
How to convert a structure to a byte array in C#? http://stackoverflow.com/questions/3278827/how-to-convert-a-structure-to-a-byte-array-in-c arr new byte size IntPtr ptr Marshal.AllocHGlobal size Marshal.StructureToPtr str ptr true Marshal.Copy ptr arr 0 size Marshal.FreeHGlobal..
Kill child process when parent process is killed http://stackoverflow.com/questions/3342941/kill-child-process-when-parent-process-is-killed IntPtr extendedInfoPtr Marshal.AllocHGlobal length Marshal.StructureToPtr extendedInfo extendedInfoPtr false if SetInformationJobObject..
Recognize Windows Shell Special Folder (i.e. get its CSIDL) via its pIDL (Now determine if pIDLs are equal with C#) http://stackoverflow.com/questions/3572220/recognize-windows-shell-special-folder-i-e-get-its-csidl-via-its-pidl-now-de data IntPtr pData Marshal.AllocHGlobal Marshal.SizeOf data Marshal.StructureToPtr data pData false return pData The problem with this approach..
Using Process.Start() to start a process as a different user from within a Windows Service http://stackoverflow.com/questions/362419/using-process-start-to-start-a-process-as-a-different-user-from-within-a-windo IntPtr ptr Marshal.AllocCoTaskMem Marshal.SizeOf sd Marshal.StructureToPtr sd ptr false InitializeSecurityDescriptor ptr SECURITY_DESCRIPTOR_REVISION..
Get ListView items from other windows http://stackoverflow.com/questions/4857602/get-listview-items-from-other-windows IntPtr ptrLvi Marshal.AllocHGlobal Marshal.SizeOf lvi Marshal.StructureToPtr lvi ptrLvi false SendMessage hListView LVM_GETITEM IntPtr.Zero..
Working example of CreateJobObject/SetInformationJobObject pinvoke in .net? http://stackoverflow.com/questions/6266820/working-example-of-createjobobject-setinformationjobobject-pinvoke-in-net Marshal.AllocHGlobal Marshal.SizeOf limits Marshal.StructureToPtr limits pointerToJobLimitInfo false SetInformationJobObject job..
How do I use InternetSetOption? http://stackoverflow.com/questions/6353715/how-do-i-use-internetsetoption Marshal.SizeOf struct_IPI Converting structure to IntPtr Marshal.StructureToPtr struct_IPI intptrStruct true bool iReturn InternetSetOption..
Has anyone got any code to call SignerSignEx from C#? http://stackoverflow.com/questions/6357759/has-anyone-got-any-code-to-call-signersignex-from-c Marshal.SizeOf typeof uint var index 0 Marshal.StructureToPtr index info.pdwIndex false info.dwSubjectChoice 0x1 SIGNER_SUBJECT_FILE.. Marshal.SizeOf typeof SIGNER_FILE_INFO Marshal.StructureToPtr fileInfo info.Union1.pSignerFileInfo false IntPtr pSubjectInfo.. pSubjectInfo Marshal.AllocHGlobal Marshal.SizeOf info Marshal.StructureToPtr info pSubjectInfo false return pSubjectInfo private static..
Video Capture output always in 320x240 despite changing resolution http://stackoverflow.com/questions/8213574/video-capture-output-always-in-320x240-despite-changing-resolution mediaSubType Copy the data back to unmanaged memory Marshal.StructureToPtr videoInfo pmtConfig.formatPtr true hr videoStreamConfig.SetFormat.. mediaSubType Copy the data back to unmanaged memory Marshal.StructureToPtr videoInfo pmtConfig.formatPtr true hr videoStreamConfig.SetFormat..
|