Needed: Winapi Docs Off-line

Discussion in 'Software' started by HarryPotter, Dec 13, 2024.

  1. HarryPotter

    HarryPotter MajorGeek

    Hi! I just dived back into an old project I have after years of no work and am having a problem: its install program is giving me an error message. However, I don't have the WinAPI docs on me. :( I am looking to download the docs. They don't need to be up-to-date, as this program and others are to work on Win98. Where can I find them?
     
  2. DangitallRedux

    DangitallRedux Private First Class

  3. HarryPotter

    HarryPotter MajorGeek

    Downloading it now. Thanks! :)
     
  4. DangitallRedux

    DangitallRedux Private First Class

    You're welcome. Please let me know if it was helpful.
     
  5. HarryPotter

    HarryPotter MajorGeek

    I didn't try it yet, but you can help me with my project. It has an install program that only writes a file association to the Registry, but it keeps giving me an error #5 at Step #1. I am posting the code here:
    Code:
    int PASCAL WinMain( HINSTANCE hInstance,
            HINSTANCE hPrevInstance,
            LPSTR lpszCmdLine,
            int nCmdShow )
    {
        int i;
        LONG k;
        HKEY keyCFile, keyShellNew;
        LONG result;
        char filename[MAX_PATH+12];
        filename[0]='\"';
        GetModuleFileName(0, filename+1, MAX_PATH);
        strcat (filename,"\\TempCMod1.exe\" \"%1\"");
        i=DialogBox (hInstance,
            "InstallTempCMod1",
            GetDesktopWindow(),
            (DLGPROC) InstP);
        switch (i)
        {
        case 0: // Cancel
            MessageBox(
                GetDesktopWindow(),
                "Install canceled",
                "TempCMod1 Setup",0);
            return 0;
        case 1: // Install
           
            k=RegOpenKeyEx (
                HKEY_CLASSES_ROOT,//"HKEY_CLASSES_ROOT",
                ".c",
                0,0,
                &keyCFile);
            if (k!=ERROR_SUCCESS){
                sprintf (filename,
                    "Error installing TempCMod1, step 1, error %d.",
                    k);
                MessageBox (
                    GetDesktopWindow(),
                    filename,//"Error installing TempCMod1, step 2.",
                    "TempCMod1 Setup",
                    0);
                return 1;
            }
            k=RegCreateKeyEx(
                HKEY_CLASSES_ROOT,
                "\\.c\\ShellNew",
                0,
                0,
                0,
                0,
                KEY_ALL_ACCESS,
                &keyShellNew,
                0);
            if (k!=ERROR_SUCCESS)
            {
                RegCloseKey (keyShellNew);
                sprintf (filename,
                    "Error installing TempCMod1, step 2, error %d.",
                    k);
                MessageBox (
                    GetDesktopWindow(),
                    filename,//"Error installing TempCMod1, step 2.",
                    "TempCMod1 Setup",
                    0);
                return 1;
            }
            k=RegSetValueEx (
                keyShellNew,
                "Command",
                0,
                REG_SZ,
                filename,
                strlen(filename));
            if (k!=ERROR_SUCCESS)
            {
                //RegCloseKey (keyCFile);
                RegCloseKey (keyShellNew);
                MessageBox (
                    GetDesktopWindow(),
                    "Error installing TempCMod1, step 3.",
                    "TempCMod1 Setup",
                    0);
                return 1;
            }
            RegCloseKey (keyCFile);
            RegCloseKey (keyShellNew);
            return 0;
        case 2: // Uninstall
            k=RegOpenKeyEx (
                HKEY_CLASSES_ROOT,//"HKEY_CLASSES_ROOT",
                ".c",
                0,0,
                &keyCFile);
            if (k!=ERROR_SUCCESS){
                MessageBox (
                    GetDesktopWindow(),
                    "Error uninstalling TempCMod1, step 1.",
                    "TempCMod1 Setup",
                    0);
                return 1;
            }
            k=RegDeleteKey(
                keyCFile,
                "ShellNew");
            if (k!=ERROR_SUCCESS)
            {
                MessageBox (
                    GetDesktopWindow(),
                    "Error uninstalling TempCMod1, step 2.",
                    "TempCMod1 Setup",
                    0);
                return 1;
            }
            RegCloseKey (keyCFile);       
            return 0;
        }
    }
    
     
  6. DangitallRedux

    DangitallRedux Private First Class

    "...but you can help me with my project"

    Thank you for your confidence, but I'm not a programmer. Some VBA work in MS Access, some scripting (VBS and PowerShell, mostly), but that's about it.
     
  7. HarryPotter

    HarryPotter MajorGeek

    Oh. Sorry! :(
     
  8. DangitallRedux

    DangitallRedux Private First Class

    Don't be. I'm not...not about that, at least. I came late to computers, and my interests ran more toward hardware.
     
  9. HarryPotter

    HarryPotter MajorGeek

    Earlier today, I tried the link, but it was limited in the information it provided. :( Is there another link?
     
  10. DangitallRedux

    DangitallRedux Private First Class

    Not of which I am aware, but there have to be several sites devoted to programming in Pascal.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds