Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "out" in [All]

irprops

.
Summary
The BluetoothAuthenticateDeviceEx function sends an authentication request to a remote Bluetooth device. Additionally, this function allows for out-of-band data to be passed into the function call for the device being authenticated.
.

static extern uint BluetoothAuthenticateDeviceEx(IntPtr hwndParentIn, IntPtr hRadioIn, ref BLUETOOTH_DEVICE_INFO pbtdiInout, BLUETOOTH_OOB_DATA pbtOobData, uint authenticationRequirement);

.
Summary
The BluetoothAuthenticateDeviceEx function sends an authentication request to a remote Bluetooth device. Additionally, this function allows for out-of-band data to be passed into the function call for the device being authenticated.
.

static extern uint BluetoothAuthenticateDeviceEx(IntPtr hwndParentIn, IntPtr hRadioIn, ref BLUETOOTH_DEVICE_INFO pbtdiInout, BLUETOOTH_OOB_DATA pbtOobData, uint authenticationRequirement);

.

    <StructLayout(LayoutKind.Sequential, pack:=4)> _

.

        Public timeoutMultiplier As Byte

.

    <StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto, Pack:=1)> _

.

    <StructLayout(LayoutKind.Sequential, pack:=1)> _

.

    <StructLayout(LayoutKind.Sequential, pack:=1)> _

.

static extern IntPtr BluetoothFindFirstRadio(ref Bluetooth_Find_Radio_Params pbtfrp,out IntPtr phRadio );

.

    <Out()> ByRef hRadio As IntPtr) As IntPtr

.

        nextRadio = BluetoothFindFirstRadio(ref parameters, out firstRadio);

.

    [StructLayout(LayoutKind.Sequential)]

.

    static extern IntPtr BluetoothFindFirstRadio(ref BLUETOOTH_FIND_RADIO_PARAM pbtfrp, out IntPtr phRadio);

.

static extern bool BluetoothFindNextRadio(IntPtr hFind, out IntPtr phRadio);

.

    <StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)> _

.
Summary
Updates the computer local cache about the device.

ws2_32

.

    /// Use to determine if all out of band (OOB) data has been read.

.

        SIO_FIND_ROUTE = 1207959555,

.

        SIO_ROUTING_INTERFACE_QUERY = -939524076,

.

        SIO_ROUTING_INTERFACE_CHANGE = -2013265899,

.

        /* [OUT] INTERFACE_INFO */

.

        /* [OUT] Int32*/

.

        /// Use to determine if all out of band (OOB) data has been read.

.

    public static extern int getsockopt(IntPtr s, SocketOptionLevel level, SocketOptionName optname, out int optval, ref int optlen);

.

    public int ReceiveTimeout

.

        Native.getsockopt(socketPtr, Native.SocketOptionLevel.Socket, Native.SocketOptionName.ReceiveTimeout, out optval, ref optlen);

.

        Native.setsockopt(socketPtr, Native.SocketOptionLevel.Socket, Native.SocketOptionName.ReceiveTimeout, ref optval, optlen);

.

    [StructLayout(LayoutKind.Sequential)]

.

        /// Processes Out Of Band (OOB) data.

.

        /// send without using routing tables

.

        MSG_DONTROUTE = 0x4,

13: select
.

        ref timeval timeout);

14: send
.

    /// <summary>    Specifies that the data should not be subject to routing. A Windows Sockets service provider can choose to ignore this flag</summary>

.

    DontRoute = 1,

.

    [StructLayout(LayoutKind.Sequential)]

.

    [StructLayout(LayoutKind.Sequential)]

15: SendTo
.

    /// <summary>    Specifies that the data should not be subject to routing. A Windows Sockets service provider can choose to ignore this flag</summary>

.

    DontRoute = 1,

.

    [StructLayout(LayoutKind.Sequential)]

.

    [StructLayout(LayoutKind.Sequential)]

.

    public int ReceiveTimeout

.

        Native.getsockopt(socketPtr, Native.SocketOptionLevel.Socket, Native.SocketOptionName.ReceiveTimeout, out optval, ref optlen);

.

        Native.setsockopt(socketPtr, Native.SocketOptionLevel.Socket, Native.SocketOptionName.ReceiveTimeout, ref optval, optlen);

.

        DontRoute = 0x10,

.

        OutOfBandInline = 0x100,

.

        ReceiveTimeout = 0x1006,

.

        SendTimeout = 0x1005,

.

        /// Set/get IPv6 routing header.

.

        /// Receive the routing header.

.

        /// Set/get IPv6 routing header.

.

        /// Receive the routing header.

.

        SO_DONTROUTE        =   0x0010,

.

        /// send timeout

.

        /// receive timeout

.

        /// to disable UDP checksum calculation, it may simply store this option without taking any action. This option is not supported for IPv6.

.

    [StructLayout(LayoutKind.Sequential)]

.

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]

.

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]

.

        IntPtr lpvOutBuffer, int cbOutBuffer,

.

        IntPtr lpOverlapped, IntPtr lpCompletionRoutine);

.

        result = WSAStartup(2, out data);

.

static extern Int32 WSAIoctl(Int32 s, UInt32 dwControlCode, IntPtr lpvInBuffer, Int32 cbInBuffer, IntPtr lpvOutBuffer, Int32 cbOutBuffer, out UInt32 lpcbBytesReturned, IntPtr lpOverlapped, IntPtr lpCompletion);

.

[StructLayout(LayoutKind.Sequential)]

.

[StructLayout(LayoutKind.Sequential)]

.

        SO_DONTROUTE = 0x0010,

.

        // send timeout  

.

        // receive timeout  

.

static extern Int32 WSAStartup(Int16 wVersionRequested, out WSAData wsaData);

.
Summary
The WSAStringToAddress function converts a network address in its standard text presentation form into its numeric binary form in a sockaddr structure, suitable for passing to Windows Sockets routines that take such a structure.
.
  • lpProtocolInfo: The WSAPROTOCOL_INFO structure associated with the provider to be used. If this is NULL, the call is routed to the provider of the first protocol supporting the indicated AddressFamily.

advapi32

.

   out UInt32 ReturnLengthInBytes);

.

    [StructLayout(LayoutKind.Sequential, Pack = 1)]

.

          if (NativeMethods.OpenProcessToken(currentProcess, NativeMethods.TOKEN_ADJUST_PRIVILEGES | NativeMethods.TOKEN_QUERY, out tokenHandle))

.

           throw new ArgumentOutOfRangeException(typeof(SecurityEntity).Name);

.

                          out IntPtr tokenHandle);

.

      [StructLayout(LayoutKind.Sequential)]

.

      [StructLayout(LayoutKind.Sequential)]

.

    'This routine enables the Shutdown privilege for the current process,

.

    <StructLayout(LayoutKind.Sequential)> _

.

    <StructLayout(LayoutKind.Sequential)> _

.

    <StructLayout(LayoutKind.Sequential)> _

.

    out IntPtr pSid);

.

    [StructLayout(LayoutKind.Sequential)]

.

    Native.AllocateAndInitializeSid(ref NtAuthority, 1, AuthenticatedUser, 0, 0, 0, 0, 0, 0, 0, out AuthenticatedUsersSid);

.

    out IntPtr ppAuditCategoriesArray,

.

    out int pCountReturned);

.

    AuditEnumerateCategories(out buffer,out categoryCount);

.

    [StructLayout(LayoutKind.Sequential)]

.

static extern bool CheckTokenMembership(IntPtr TokenHandle, IntPtr SidToCheck, out bool IsMember);

.

    Quick and cheerful, this routine will attempt to save and clear the specified EventLog to the specified folder.

.

     private int WAIT_TIMEOUT = 0x00000102;

.

             if (WaitHandle.WaitAny (activeHeartbeatHandles, heartbeatMilliseconds, false) == WAIT_TIMEOUT)

.

    out IntPtr ptrSid);

.

static extern bool ConvertSidToStringSid(IntPtr pSid, out string strSid);

.
Dissent
Don't use an IntPtr like above, just use a System.Text.StringBuilder. You shouldn't need to worry about calling LocalFree in this case either, but I have not confirmed this 100%.
.

   if (!ConvertSidToStringSid(sid,out ptrSid))

.

  out IntPtr    SecurityDescriptor,

.

  out UIntPtr   SecurityDescriptorSize

.

            out IntPtr ptrSid

.

            ManagementBaseObject outParams1 = UserObject.InvokeMethod("GetSecurityDescriptor", inParams1, null);

.

            Descriptor = ((ManagementBaseObject)(outParams1.Properties["Descriptor"].Value));

.

    ManagementBaseObject outParams = Share.InvokeMethod("ChangeSecurityPermissions", inParams, null);

.

        out IntPtr ptrSid);

.

                ConvertStringSidToSid(UserObject["SID"].ToString(), out SID_ptr);

.

    out PROCESS_INFORMATION lpProcessInformation);     

.

                           <[In](), Out(), [Optional]()> ByVal lpCommandLine As StringBuilder, _

.

                           <Out()> ByRef lpProcessInformation As PROCESS_INFORMATION) As <MarshalAs(UnmanagedType.Bool)> Boolean

.

     out ProcessInformation     processInformation);

.

    Public StdOutputHandle As Int32 = -11

.

    <StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto)> _

.

    Public stdOutput As IntPtr

.

    Marshal.WriteInt32(MyPointer, StdOutputHandle)

.

    startupInfo.stdOutput = MyPointer  

.

        public const Int32      StdOutputHandle = -11;

.

        [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]

.

            public IntPtr stdOutput;

.

            out  ProcessInformation processInformation);

.

            startupInfo.stdOutput = (IntPtr)StdOutputHandle;

.

                    out processInfo);

.

    /// control manager about the status of the service.

.

    ''' control manager about the status of the service.

.

I changed the C# version from using "out uint lpdwTagId" to "string lpdwTagId". Without that change, the C# call to CreateService always returned an incorrect parameter error.

.

      NativeMethods.ConvertSidToStringSid(pSid, out sidString);

.

    [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]

.

                    out IntPtr marshaledCredential);

.

    [StructLayout(LayoutKind.Sequential)]

.

One needs to free the string returned in the "out IntPtr marshaledCredential" parameter!

.

                            out marshaledCredential);

.

public static extern bool CredRead(string target, CRED_TYPE type, int reservedFlag, out IntPtr credentialPtr);

.

    [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]

.

    if(CredRead(strTarget, CRED_TYPE.GENERIC, 0, out credPtr))

.

                          [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CredentialInMarshaler))]out Credential credential);

.

       [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]

.

        [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]

.

Custom Marshalling provide a self contained and caller transparent solution to this scenario, the returned Credentials object is fully managed without the need to worry about object lifetimes.

.

[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]

.

The stuff on this page about needing custom marshaling are just wrong.

.

[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]

.

        out IntPtr phProv,

.

bool res = Crypt32.CryptAcquireContext(out hProv, "user", null, PROV_RSA_FULL, CRYPT_NEWKEYSET);

.

public static extern bool CryptExportKey(IntPtr hKey, IntPtr hExpKey, uint dwBlobType, uint dwFlags, [In, Out] byte[] pbData, ref uint dwDataLen);

.

        [Out] out IntPtr phKey

.

CryptGenKey(hProv, (uint)CryptAlg.CALG_RSA_SIGN, dwFlags, out hKey);

.

        [Out] byte[] pbData,

.

        [In,Out] ref uint pdwDataLen,

.

   [In, Out] byte[] pbData,

.

   <[In], Out> pbData() As Byte, ByRef dwDataLen As Integer, dwFlags As Integer) As Boolean

.

    [Out] byte[] signature,

.

    [In, Out] ref uint signatureLen);

.

    out IntPtr phNewToken );

.

    out IntPtr phNewToken );

.

      out uint pcbBytesNeeded, out uint lpServicesReturned,

.

As usual when doing pinvoke operations, watch out for 64 bit vs 32 bit and packing boundaries.

.

           if (!EnumServicesStatusEx(handle, SC_ENUM_PROCESS_INFO, (int)ServiceType.SERVICE_WIN32, (int)ServiceStateRequest.SERVICE_STATE_ALL, IntPtr.Zero, 0, out iBytesNeeded, out iServicesReturned, ref iResumeHandle, null))

.

          if (!EnumServicesStatusEx(handle, SC_ENUM_PROCESS_INFO, (int)ServiceType.SERVICE_WIN32, (int)ServiceStateRequest.SERVICE_STATE_ALL, buf, iBytesNeeded, out iBytesNeeded, out iServicesReturned, ref iResumeHandle, null))

.

      out uint pcbBytesNeeded, out uint lpServicesReturned,

.

      [StructLayout(LayoutKind.Sequential, Pack = 4)]

.

      [StructLayout(LayoutKind.Sequential)]

56: GetAce
.

  static extern int GetAce(IntPtr aclPtr, int aceIndex, out IntPtr acePtr);

.

  static extern bool GetAce(IntPtr aclPtr, int aceIndex, out IntPtr acePtr); // returns bool per MS

.

        out IntPtr bufPtr);

.

        [MarshalAs(UnmanagedType.Bool)] out bool bDaclPresent,

.

        [MarshalAs(UnmanagedType.Bool)] out bool bDaclDefaulted

.

        out IntPtr acePtr

.

        out IntPtr ptrSid

.

    [StructLayout(LayoutKind.Sequential)]

.

    [StructLayout(LayoutKind.Sequential)]

.

    [StructLayout(LayoutKind.Sequential)]

.

    [StructLayout(LayoutKind.Sequential)]

.

        int err = NetShareGetInfo(args[0], args[1], 502, out bufptr);

.

            GetSecurityDescriptorDacl(shareInfo.shi502_security_descriptor, out bDaclPresent, ref pAcl, out bDaclDefaulted);

.

                    err = GetAce(pAcl, i, out pAce);

.

                    ConvertSidToStringSid(bSID, out ptrSid);

.
Summary
Retrieves information about an access control list (ACL)
.

Retrieves information about the current hardware profile for the local computer.

.

[StructLayout(LayoutKind.Sequential)]

.

    if ( !ConvertStringSidToSid(stringSid, out pSid) )

.

    out IntPtr pSidOwner,

.

    out IntPtr pSidGroup,

.

    out IntPtr pDacl,

.

    out IntPtr pSacl,

.

    out IntPtr pSecurityDescriptor);

.

        out pSid, out pZero, out pZero, out pZero, out psd);

.

    errorReturn = LookupAccountSid(null, pSid, _account, ref _accounLength, _domain, ref _domainLength, out _sidNameUse);

Cut off search results after 60. Please refine your search.


 
Access PInvoke.net directly from VS: