Announcement

Collapse
No announcement yet.

Wähl-Dialog

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wähl-Dialog

    Ich wollte einen Standart-Internet-Dialog aufrufen, als wenn man bei XP auf Start-Verbinden mit-Eine Verbindun klickt und das dann da halbt die Daten der Standartverbindung stehen. Ich habe folgenden Code:
    Code:
    #include <windows.h>
    #include <stdio.h>
    #include "ras.h"
    #include "rasdlg.h"
    #pragma comment(lib, "rasapi32.lib")
    
    int main (){
        
        // Initialize the return code
        BOOL nRet = TRUE;
    
        // Allocate heap memory for the RASPBLDG structure
        RASPBDLG * lpInfo = (LPRASPBDLG)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(RASPBDLG));
        
        // The dwsize member of lpInfo must contain the structure size, or the 
        // call to RasPhonebookDlg will fail
        lpInfo->dwSize = sizeof(RASPBDLG);
         
        // Open a user dialog box  
        nRet = RasPhonebookDlg(NULL,NULL,lpInfo);
        
        if(nRet == TRUE){
            // The user dialed a connection successfully
            printf("User pressed Connect\n");
        }else{
            if(lpInfo->dwError != 0){
                printf("RasPhonebookDlg failed: Error = %d\n", lpInfo->dwError);
            }else{
                // The user closed the dialog box manually
                printf("User pressed Close\n");
            }
        }
    
        // Free the heap memory for the RASPBLDG structure
        HeapFree(GetProcessHeap(), 0, lpInfo);
        return 0;
    }
    Alledungs funtionniert der bei mir nicht
Working...
X