Click here to Skip to main content
15,887,596 members
Home / Discussions / C#
   

C#

 
QuestionRemplir une datagridview à l'aide d'une autre Pin
geralson6-May-13 4:45
geralson6-May-13 4:45 
AnswerRe: Remplir une datagridview à l'aide d'une autre Pin
Eddy Vluggen6-May-13 4:58
professionalEddy Vluggen6-May-13 4:58 
GeneralFill a datagridview using another Pin
geralson6-May-13 5:09
geralson6-May-13 5:09 
GeneralRe: Fill a datagridview using another Pin
Dave Kreskowiak6-May-13 7:12
mveDave Kreskowiak6-May-13 7:12 
QuestionFetch Data from another website Pin
sandeep Nishad5-May-13 20:40
sandeep Nishad5-May-13 20:40 
AnswerRe: Fetch Data from another website Pin
OriginalGriff5-May-13 22:07
mveOriginalGriff5-May-13 22:07 
AnswerRe: Fetch Data from another website Pin
Clifford Nelson6-May-13 5:38
Clifford Nelson6-May-13 5:38 
QuestionAuto Dial-Up Method not working on 64-bit machine Pin
Edward_Zhao5-May-13 14:40
professionalEdward_Zhao5-May-13 14:40 
Here is the method auto dial up without the login dialoge
C#
public uint Connect(string EntryName, string UserName, string Password, out IntPtr RasConn)
{
    uint retVal;
    uint r=0;
    RasConn=IntPtr.Zero;
    byte[] bRASDIALPARAMS =new byte[1464];
    fixed (byte* pAddr = bRASDIALPARAMS)
    {
        byte* pCurrent = pAddr;
        Marshal.WriteInt32((IntPtr)pCurrent, bRASDIALPARAMS.Length);
        pCurrent += 4;
        foreach (byte b in Encoding.Unicode.GetBytes(EntryName))
        {
            Marshal.WriteByte((IntPtr)pCurrent, b);
            pCurrent++;
        }
        pCurrent = pAddr + 0x192;//0x192 - offset for RASDIALPARAMS.UserName
        foreach (byte b in Encoding.Unicode.GetBytes(UserName))
        {
            Marshal.WriteByte((IntPtr)pCurrent, b);
            pCurrent++;
        }
        pCurrent = pAddr + 0x394;//0x394 - offset for RASDIALPARAMS.Password
        foreach (byte b in Encoding.Unicode.GetBytes(Password))
        {
            Marshal.WriteByte((IntPtr)pCurrent, b);
            pCurrent++;
        }
        retVal = RAS.RasDial(IntPtr.Zero, IntPtr.Zero, (IntPtr)pAddr, 0, IntPtr.Zero, ref RasConn);
    }

    return retVal;
}

[DllImport("rasapi32.dll", CharSet = CharSet.Auto)]
public extern static uint RasDial(
    IntPtr dialExtensions,
    IntPtr phoneBookPath,
    IntPtr rasDialParam,
    uint NotifierType,
    IntPtr notifier,
    ref IntPtr pRasConn
    );





It works fine on my xp machine,but move it to win7 the Connect() method returns erro 632,what's wrong in win7,does anyone have a clue? Cry | :((
AnswerRe: Auto Dial-Up Method not working on 64-bit machine Pin
Garth J Lancaster5-May-13 16:41
professionalGarth J Lancaster5-May-13 16:41 
GeneralRe: Auto Dial-Up Method not working on 64-bit machine Pin
Edward_Zhao8-May-13 20:10
professionalEdward_Zhao8-May-13 20:10 
Questionwebrequest/response live.mail.com Pin
Crispybc5-May-13 12:15
Crispybc5-May-13 12:15 
AnswerRe: webrequest/response live.mail.com Pin
Bernhard Hiller5-May-13 22:04
Bernhard Hiller5-May-13 22:04 
GeneralRe: webrequest/response live.mail.com Pin
Crispybc6-May-13 2:41
Crispybc6-May-13 2:41 
Questionproblem Webservice Pin
azadehrasadi5-May-13 0:12
azadehrasadi5-May-13 0:12 
AnswerRe: problem Webservice Pin
OriginalGriff5-May-13 6:08
mveOriginalGriff5-May-13 6:08 
GeneralRe: problem Webservice Pin
azadehrasadi12-May-13 2:17
azadehrasadi12-May-13 2:17 
GeneralRe: problem Webservice Pin
OriginalGriff12-May-13 2:24
mveOriginalGriff12-May-13 2:24 
GeneralRe: problem Webservice Pin
azadehrasadi12-May-13 18:31
azadehrasadi12-May-13 18:31 
QuestionWEB SERVICES Pin
sonu Ranjan4-May-13 22:16
sonu Ranjan4-May-13 22:16 
AnswerRe: WEB SERVICES Pin
Abhinav S5-May-13 20:37
Abhinav S5-May-13 20:37 
QuestionUSB device being in use Pin
Blubbo3-May-13 5:10
Blubbo3-May-13 5:10 
AnswerRe: USB device being in use Pin
Gerry Schmitz3-May-13 11:54
mveGerry Schmitz3-May-13 11:54 
GeneralRe: USB device being in use Pin
Blubbo8-May-13 8:23
Blubbo8-May-13 8:23 
GeneralRe: USB device being in use Pin
Gerry Schmitz8-May-13 11:12
mveGerry Schmitz8-May-13 11:12 
QuestionIs streamreader slow compared to other text import functions? Pin
turbosupramk33-May-13 3:42
turbosupramk33-May-13 3:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.