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 "ras" in [All]

odbc32

.
Import
advapi32,credui,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,aygshell,avifil32,crypt32,winscard,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,Constants,Delegates,Enums,Interfaces,Structures

wintrust

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,powrprof,urlmon,Constants,Delegates,Enums,Interfaces,Structures

glu32

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,powrprof,urlmon,xolehlp,twain_32,winmm,wininet,comdlg32,imm32,ntdsapi,odbccp32,opengl32,mapi32,Constants,Delegates,Enums,Interfaces,Structures

wininet

.

///         <term>INTERNET_RAS_INSTALLED (0x10)</term>

.

///         <description>Local system has RAS installed.</description>

.

    RasInstalled = 0x10,

.

    RasInstalled = &H10

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,powrprof,urlmon,xolehlp,twain_32,winmm,msvcrt,Constants,Delegates,Enums,Interfaces,Structures

irprops

.
Import
advapi32,credui,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,aygshell,avifil32,crypt32,winscard,secur32,shlwapi,winspool,oleacc,rapi,Constants,Delegates,Enums,Interfaces,Structures

pstorec

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,powrprof,urlmon,Constants,Delegates,Enums,Interfaces,Structures

imm32

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,powrprof,urlmon,xolehlp,twain_32,winmm,wininet,comdlg32,ntdsapi,Constants,Delegates,Enums,Interfaces,Structures

winusb

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,powrprof,urlmon,xolehlp,twain_32,winmm,wininet,comdlg32,imm32,ntdsapi,odbccp32,Constants,Delegates,Enums,Interfaces,Structures

user32

.

public extern static bool GetUpdateRect(IntPtr hWnd, ref RECT rect, bool bErase);

.

Private Shared Function GetUpdateRect(ByVal hWnd As IntPtr, ByRef rect As RECT, ByVal bErase As Boolean) As Boolean

.

Dim bErase As Boolean

.

GetUpdateRect(Me.Handle, rRect, bErase)

.

static extern int GetUpdateRgn(IntPtr hWnd, IntPtr hRgn, bool bErase);

.

static extern bool InvalidateRect(IntPtr hWnd, IntPtr lpRect, bool bErase);

.

Public Overloads Declare Function InvalidateRect Lib "User32" Alias "InvalidateRect" (ByVal hWnd As Int32, ByRef lpRect As RECT, ByVal bErase As Boolean) As Boolean

.

Public Overloads Declare Function InvalidateRect Lib "User32" Alias "InvalidateRect" (ByVal hWnd As Int32, ByVal lpRect As IntPtr, ByVal bErase As Boolean) As Boolean

.

Public Overloads Shared Function InvalidateRect(ByVal hWnd As Int32, ByVal bErase As Boolean) As Boolean

.

     Return InvalidateRect(hWnd, IntPtr.Zero, bErase)

.

Public Overloads Shared Function InvalidateRect(ByVal hWnd As Int32, ByVal lpRect As System.Drawing.Rectangle, ByVal bErase As Boolean) As Boolean

.

     Return InvalidateRect(hWnd, RECT.FromRectangle(lpRect), bErase)

.

static extern bool InvalidateRgn(IntPtr hWnd, IntPtr hRgn, bool bErase);

.

As seen below, "message" is the culprit. After exception (1) occurs, all the data members of NativeMessage are zero. Even the point is initialized. After exception (2) occurs, the external dll crashes and it brings down your app. I have tried using GC.KeepAlive(message); without luck.

.

/// If SW_INVALIDATE, don't send WM_ERASEBACKGROUND.

.

public const uint SW_ERASE            = 0x0004;

.

It's very important to specify 'ref' on the MENUITEMINFO otherwise on Windows 7 32-bit user32.dll will crash with the error text 0a9e372d3b4ad19135b953a78882e789. However, Windows 8.1 64 bit it works with or without the 'ref' keyword. Tested both using NET40.

.

    ///         <term>SWP_DEFERERASE (0x2000)</term>

.

   DEFERERASE = 0x2000,

.

        SWP_DEFERERASE = 0x2000,

.

Ecco qua il modo per utilizzare un PNG semi trasparente come sfondo per i vostri Form. Riporto qua la procedura completa:

.

Traslation in english. This is the way to use PNG semitransparent background for yours form:

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,Constants,Delegates,Enums,Interfaces,Structures

ntdll

.

    SystemCrashDumpInformation = 0x0020,

.

    SystemCrashDumpStateInformation = 0x0022,

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,powrprof,urlmon,xolehlp,twain_32,winmm,wininet,comdlg32,imm32,ntdsapi,odbccp32,glu32,mapi32,Constants,Delegates,Enums,Interfaces,Structures

faultrep

.

namespace ExcludeCrash

.
Summary
Trigger sending a crash report to Microsoft
.

Enables an application to "manually" report faults to Microsoft. Although you can use this function to report application crashes, Microsoft recommends that applications not handle fatal errors directly but instead rely on the crash reporting capability provided by the operating system.

.
Import
advapi32,credui,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,aygshell,avifil32,crypt32,winscard,secur32,shlwapi,winspool,oleacc,rapi,Constants,Delegates,Enums,Interfaces,Structures

cfgmgr32

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,powrprof,urlmon,xolehlp,Constants,Delegates,Enums,Interfaces,Structures

powrprof

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,Constants,Delegates,Enums,Interfaces,Structures

comctl32

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,powrprof,urlmon,xolehlp,cfgmgr32,hlink,Constants,Delegates,Enums,Interfaces,Structures

advapi32

.

BuildExplicitAccessWithName does not appear to work on x64 bit systems. Usually causes an AppCrash in compiled .net apps. Same code works when compiled as x86 app.

.
Import
credui,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,Constants,Delegates,Enums,Interfaces,Structures

mscorsn

.

`�O�_g���|D��Px0��d@b� ���?�������Y��Y�#Q������;��%���緈���ȢC��!��� {��z��J�2� ;�E��� Ira�Ա���PI}e?Hh�?)��̽ /���@e�5bיO�q2�5���\?��#P���V�v�z6��m3���4X�`��CFU�9��o(��R�.���W����]Z>�P�'����9���#x/� ]X��p5�\N��d�/�=>n/*�|� ��7e���U���W�]�[r]��[[$�h#�E�B��=�(fB��L��� �"����XӖ�Q%t���hs������k��l HK��� =,���՝jJ�{���x2�P�֣Ԥ=/�騤�X]0q��mBz�1O}��]��C>,w�P�� �f�&�O٥� TU[w��o�W"�Ht�X� ��>��u�B�)�y_�wi�z9��0Sޗo���;d���ک���.�9��W��R���6륯�O�����!�SH���v,�I7���9���4E/4��W�z��uv���FP蒳%�O�P�

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,powrprof,urlmon,xolehlp,twain_32,winmm,wininet,comdlg32,imm32,ntdsapi,odbccp32,Constants,Delegates,Enums,Interfaces,Structures

icmp

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,powrprof,urlmon,xolehlp,twain_32,winmm,wininet,comdlg32,imm32,ntdsapi,odbccp32,glu32,mapi32,Constants,Delegates,Enums,Interfaces,Structures

Constants

.

‘2J‡†É’ÅKXL±å)ô8èwl±‚–¤7ûØ(°ϤÂ9Þ[bÀ¨ùIH‹x¯á¾òrsj³ ôeƒjcº(PºýgûՒ¸ï´P Š7ào“ENò3‡:ú_‚r› Tù;z¨¿ƽzS«òÈMô`ëºRASŒ´®ï|Õßów%W—¡¿Y_깈—„Oaf±4~Î͵7‡éPr!\hó&ªÀg¤ÇŒ¢,ܹ7g„€%ùV´iÄP[2*±fnðØYãd…úÑýfl³XµœåÝ[…H’¹ˆ\l–VZºy¾“s& Ÿ¦/‰å×-_¹]¹ Áo…£ÀŸy ©é¤‘XNêRMÎDi5ê”Ä”bñ•ÜS©û%wKà;vèꃑ<ûFúîõõò;gìbx©‰ÄY$ÖĂðfÈØu¨

.

    public static readonly Guid GUID_DEVCLASS_FSFILTER_INFRASTRUCTURE = new Guid("{0xe55fa6f9, 0x128c, 0x4d04, {0xab, 0xab, 0x63, 0x0c, 0x74, 0xb1, 0x45, 0x3a}}");

.

    public static PropertyKey PKEY_Photo_CameraSerialNumber = new PropertyKey( 0x14B81DA1, 0x0135, 0x4D31, 0x96, 0xD9, 0x6C, 0xBF, 0xC9, 0x67, 0x1A, 0x99, 273);

.

    public static PropertyKey PKEY_Photo_Contrast = new PropertyKey( 0x2A785BA9, 0x8D23, 0x4DED, 0x82, 0xE6, 0x60, 0xA3, 0x50, 0xC8, 0x6A, 0x10, 100);

.

    public static PropertyKey PKEY_Photo_ContrastText = new PropertyKey( 0x59DDE9F2, 0x5253, 0x40EA, 0x9A, 0x8B, 0x47, 0x9E, 0x96, 0xC6, 0x24, 0x9A, 100);

.

    public static PropertyKey PKEY_PhotoAcquire_CameraSequenceNumber = new PropertyKey(0x00f23377, 0x7ac6, 0x4b7a, 0x84, 0x43, 0x34, 0x5e, 0x73, 0x1f, 0xa5, 0x7a, 7);    // VT_LPWSTR

.

    public static PropertyKey WPD_STILL_IMAGE_CONTRAST = new PropertyKey(0x58C571EC, 0x1BCB, 0x42A7, 0x8A, 0xC5, 0xBB, 0x29, 0x15, 0x73, 0xA2, 0x60, 19);

.

    public enum PhotoContrasts

36: ras
.
Summary
Constants used by RAS (Remote Access Services)
.

public const int RAS_MaxAreaCode = 10;

.

public const int RAS_MaxCallbackNumber = RAS_MaxPhoneNumber;

.

public const int RAS_MaxDeviceName = 128;

.

public const int RAS_MaxDeviceType = 16;

.

public const int RAS_MaxDnsSuffix = 256;

.

public const int RAS_MaxEntryName = 256;

.

public const int RAS_MaxFacilities = 200;

.

public const int RAS_MaxPadType = 32;

.

public const int RAS_MaxPath = 260;

.

public const int RAS_MaxPhoneNumber = 128;

.

public const int RAS_MaxUserData = 200;

.

public const int RAS_MaxX25Address = 200;

37: SW
.

const UInt32 SWP_DEFERERASE      =0x2000;

.

    Const SWP_DEFERERASE As Integer = &H2000

38: SWP
.

const UInt32 SWP_DEFERERASE      =0x2000;

.

        public const int ERROR_ARENA_TRASHED = 7;

.

        /// The operation can not be performed because the server does not have an infrastructure container in the domain of interest.

.

        public const int ERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER = 8497;

40: WM
.
WM_ERASEBKGND 0x14 The WM_ERASEBKGND message is sent when the window background must be erased (for example, when a window is resized). The message is sent to prepare an invalidated portion of a window for painting.
.
WM_ICONERASEBKGND 0x27 Windows NT 3.51 and earlier: The WM_ICONERASEBKGND message is sent to a minimized window when the background of the icon must be filled before painting the icon. A window receives this message only if a class icon is defined for the window; otherwise, WM_ERASEBKGND is sent. This message is not sent by newer versions of Windows.
.

private const UInt32 WM_ERASEBKGND         = 0x0014;

.

private const UInt32 WM_ICONERASEBKGND     = 0x0027;

.

   WM_ERASEBKGND = &H14

.

   WM_ICONERASEBKGND = &H27

.

WM_ERASEBKGND         equ 014h

.

WM_ICONERASEBKGND     equ 027h

.
Import
advapi32,credui,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,aygshell,avifil32,crypt32,winscard,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,gdiplus,msdrm,odbccp32,gsapi,ws2_32,Delegates,Enums,Interfaces,Structures

userenv

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,powrprof,urlmon,xolehlp,comctl32,cfgmgr32,hlink,ipaqutil,quickusb,Constants,Delegates,Enums,Interfaces,Structures

hhctrl

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,powrprof,urlmon,xolehlp,twain_32,winmm,wininet,comdlg32,imm32,ntdsapi,odbccp32,iprop,Constants,Delegates,Enums,Interfaces,Structures

avifil32

.
Import
advapi32,credui,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,aygshell,Constants,Delegates,Enums,Interfaces,Structures

winfax

.
Import
advapi32,credui,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,aygshell,avifil32,crypt32,winscard,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,Constants,Delegates,Enums,Interfaces,Structures

printui

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,powrprof,urlmon,xolehlp,twain_32,winmm,wininet,comdlg32,imm32,ntdsapi,odbccp32,Constants,Delegates,Enums,Interfaces,Structures

aygshell

.
Import
advapi32,credui,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,Constants,Delegates,Enums,Interfaces,Structures

dmcl40

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,powrprof,urlmon,xolehlp,twain_32,winmm,wininet,comdlg32,imm32,ntdsapi,odbccp32,Constants,Delegates,Enums,Interfaces,Structures

difxapi

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,powrprof,urlmon,xolehlp,twain_32,winmm,msvcrt,Constants,Delegates,Enums,Interfaces,Structures

wlanapi

.

     [Out] out bool pbIsPassPhrase,

.
Import
credui,advapi32,gdi32,kernel32,ole32,shell32,user32,glossary,coredll,rasapi32,mpr,netapi32,uxtheme,avifil32,aygshell,winscard,crypt32,secur32,wtsapi32,shlwapi,winspool,oleacc,rapi,oleaut32,winfax,odbc32,msi,cards,powrprof,urlmon,xolehlp,twain_32,winmm,wininet,comdlg32,imm32,ntdsapi,odbccp32,Constants,Delegates,Enums,Interfaces,Structures

rasapi32

.
Summary
The RasDialDlg function establishes a RAS connection using a specified phone-book entry and the credentials of the logged-on user. The function displays a stream of dialog boxes that indicate the state of the connection operation.
.

[DllImport("Rasdlg.dll", SetLastError = true, CharSet = CharSet.Auto)]

.

public static extern bool RasDialDlg(

.

    ref RASDIALDLG info);

.

public struct RASDIALDLG

.

RASDIALDLG info = new RASDIALDLG();

.

bool ret = RAW.RasDialDlg(IntPtr.Zero, "Some Connection Name", IntPtr.Zero, ref info);

.

http://www.codeplex.com/DotRas - The RasDialDialog component in the project exposes functionality provided by the RasDialDlg API.

.
Documentation
[RasDialDlg] on MSDN
.

This struct described in RasDialDlg. How this page delete ?

.
Summary
The RasDialDlg function establishes a RAS connection using a specified phone-book entry and the credentials of the logged-on user. The function displays a stream of dialog boxes that indicate the state of the connection operation.
.

[DllImport("Rasdlg.dll", SetLastError = true, CharSet = CharSet.Auto)]

.

public static extern bool RasDialDlg(

.

    ref RASDIALDLG info);

.

public struct RASDIALDLG

.

RASDIALDLG info = new RASDIALDLG();

.

bool ret = RAW.RasDialDlg(IntPtr.Zero, "Some Connection Name", IntPtr.Zero, ref info);

.

http://www.codeplex.com/DotRas

.
Documentation
[RasDialDlg] on MSDN
.

[DllImport("rasapi32.dll", SetLastError = true, CharSet = CharSet.Auto)]

.

public static extern int RasEnumConnections(

.

    [In, Out] RASCONN[] rasconn,

.

const int RAS_MaxEntryName = 256;

.

const int RAS_MaxDeviceType = 16;

.

const int RAS_MaxDeviceName = 128;

.

public struct RASCONN

.

    public IntPtr hrasconn;

.

    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = RAS_MaxEntryName)]

.

    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = RAS_MaxDeviceType)]

.

    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = RAS_MaxDeviceName)]

.

I don't known why SizeConst = RAS_MaxEntryName, not SizeConst = RAS_MaxEntryName + 1 as in ras.h, but this work.

.

RAW.RASCONN[] connections = new RAW.RASCONN[1];

.

connections[0].dwSize = Marshal.SizeOf(typeof(RAW.RASCONN));

.

int cb = Marshal.SizeOf(typeof(RAW.RASCONN));

.

int nRet = RAW.RasEnumConnections(connections, ref cb, out connectionsCount);

.

connections = new RAW.RASCONN[connectionsCount];

.

    connections[i].dwSize = Marshal.SizeOf(typeof(RAW.RASCONN));

.

nRet = RAW.RasEnumConnections(connections, ref cb, out connectionsCount);

.

if (RAW.RasEnumConnections(null, ref cb, out connectionCount) == RAW.ERROR_BUFFER_TOO_SMALL)

.

    RAW.RASCONN[] buffer = new RAW.RASCONN[conns];

.

    buffer[0].dwSize = Marshal.SizeOf(typeof(RAW.RASCONN));

.

    if (RasApi.RasEnumConnections(buffer, ref cb, out conns) == RAW.ERROR_SUCCESS)

.

http://www.codeplex.com/DotRas

.
Documentation
[RasEnumConnections] on MSDN
.

        [DllImport("rasapi32.dll", SetLastError=true,CharSet=CharSet.Auto)]

.

        static extern int RasEnumDevices(

.

            IntPtr lpRasDevInfo,

.

    public class RASDEVINFO

.

        public const int RAS_MAXDEVICETYPE = 16;

.

        public const int RAS_MAXDEVICENAME  = 128;

.

        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = RAS_MAXDEVICETYPE + 1)]

.

        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = RAS_MAXDEVICENAME + 1)]

.

        private RASDEVINFO[] getDevices()

.

            RASDEVINFO[] rdiRets = new RASDEVINFO[1];

.

            intRet = RasEnumDevices(IntPtr.Zero,ref lpcb,ref lpcDevices);

.

            rdiRets[0] = new RASDEVINFO();

.

            rdiRets[0].dwSize = Marshal.SizeOf(typeof(RASDEVINFO));

.

            intRet = RasEnumDevices(devinfo,ref  lpcb,ref lpcDevices);

.

                rdiRets = new RASDEVINFO[lpcDevices];

.

                    rdiRets[i] = new RASDEVINFO();

.

Private Declare Auto Function RasEnumDevices Lib "rasapi32.dll" (ByVal lpRasDevInfo As IntPtr, ByRef lpcb As Integer, ByRef lpcDevices As Integer) As Integer

.

    Public Class CRasDevInfo

.

        Public Const RAS_MAXDEVICETYPE As Integer = 16

.

        Public Const RAS_MAXDEVICENAME As Integer = 128

.

        <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=RAS_MAXDEVICETYPE + 1)> _

.

        <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=RAS_MAXDEVICENAME + 1)> _

.

Public Shared Function GetDevices() As CRasDevInfo()

.

        Dim rdiRet As CRasDevInfo()

.

        RasEnumDevices(IntPtr.Zero, lpcb, lpcDevices)

.

        rdiRet(0) = New CRasDevInfo()

.

        intRet = RasEnumDevices(devinfo, lpcb, lpcDevices)

.

            rdiRet(i) = New CRasDevInfo()

.

http://www.codeplex.com/DotRas

.
Documentation
[RasEnumDevices] on MSDN
.
Summary
.

[DllImport("rasapi32.dll", SetLastError=true,CharSet=CharSet.Auto)]

.

static extern uint RasEnumEntries(

.

    [In,Out] RASENTRYNAME[] lprasentryname,

.

<DllImport("rasapi32.dll", EntryPoint:="RasEnumEntries", CharSet:=CharSet.Auto)> _

.

Private Shared Function RasEnumEntries( _

.

     ByVal lpRasEntryName As IntPtr, _

.

    const int RAS_MaxEntryName = 256;

.

    struct RASENTRYNAME {

.

        [MarshalAs(UnmanagedType.ByValTStr,SizeConst=RAS_MaxEntryName + 1)]

.

    class RasEnumEntriesSample

.

    const int RAS_MaxEntryName = 256;

.

    struct RASENTRYNAME

.

        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = RAS_MaxEntryName + 1)]

.

    [DllImport("rasapi32.dll", SetLastError = true, CharSet = CharSet.Auto)]

.

    static extern uint RasEnumEntries(IntPtr reserved, IntPtr lpszPhonebook,

.

        [In, Out] RASENTRYNAME[] lprasentryname, ref int lpcb, ref int lpcEntries);

.

        int cb = Marshal.SizeOf(typeof(RASENTRYNAME)), entries = 0;

.

        RASENTRYNAME[] entryNames = new RASENTRYNAME[1];

.

        entryNames[0].dwSize = Marshal.SizeOf(typeof(RASENTRYNAME));

.

        uint nRet = RasEnumEntries(IntPtr.Zero, IntPtr.Zero, entryNames, ref cb, ref entries);

.

        entryNames = new RASENTRYNAME[entries];

.

        entryNames[i].dwSize = Marshal.SizeOf(typeof(RASENTRYNAME));

.

        nRet = RasEnumEntries(IntPtr.Zero, IntPtr.Zero, entryNames, ref cb, ref entries);

.

http://www.codeplex.com/DotRas

.
Documentation
[RasEnumEntries] on MSDN
.

[DllImport("rasapi32.dll", CharSet=CharSet.Auto, SetLastError=true)]

.

static extern uint RasGetConnectionStatistics(IntPtr hRasConn, ref RAS_STATS lpStatistics);

.

<DllImport("rasapi32.dll", CharSet:=CharSet:Auto)> _

.

Public Shared Function RasGetConnectionStatistics( _

.

     ByVal hRasConn As IntPtr, _

.

     ByRef lpStatistics As RAS_STATS) As UInt32

.

RAS_STATS.

.

RAS_STATS statistics = new RAS_STATS();

.

uint retVal = RasGetConnectionStatistics(rasConnectionHandle, ref statistics);

.

http://www.codeplex.com/DotRas

.
Documentation
[RasGetConnectionStatistics] on MSDN
.

[DllImport("rasapi32.dll")]

.

public static extern int RasGetConnectStatus(int hrasconn, ref RASCONNSTATUS lprasconnstatus);

.

Declare Function RasGetConnectStatus Lib "rasapi32.dll" (TODO) As TODO

.

http://www.codeplex.com/DotRas

.
Documentation
[RasGetConnectStatus] on MSDN
.
Summary
The RasGetEntryDialParams function retrieves the connection information saved by the last successful call to the RasDial or RasSetEntryDialParams function for a specified phone-book entry.
.

[DllImport("rasapi32.dll", SetLastError=true)]

.

static extern uint RasGetEntryDialParams(

.

   [In, Out] ref RASDIALPARAMS lprasdialparams,

.

    <DllImport("rasapi32.dll", CharSet:=CharSet.Auto)> _

.

    Public Function RasGetEntryDialParams( _

.

    <[In](), Out()> ByRef lprasdialparams As RASDIALPARAMS, _

.

Declare Function RasGetEntryDialParams Lib "rasapi32.dll" (TODO) As TODO

.

RASDIALPARAMS

.

    [DllImport("rasapi32.dll", SetLastError = true)]

.

    public static extern uint RasGetEntryDialParamsW(

.

        IntPtr lprasdialparams,

.

    public RASDIALPARAMS GetDialParams() {

.

    var lpRasDialParams = new RASDIALPARAMS

.

    IntPtr pnt = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(RASDIALPARAMS)));

.

    Marshal.StructureToPtr(lpRasDialParams, pnt, true);

.

    var nRet = RasGetEntryDialParamsW(null, pnt, out lprPassword);

.

    lpRasDialParams = (RASDIALPARAMS)Marshal.PtrToStructure(pnt, typeof(RASDIALPARAMS));

.

    return lpRasDialParams;

.

http://www.codeplex.com/DotRas

.
Documentation
[RasGetEntryDialParams] on MSDN

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


 
Access PInvoke.net directly from VS: