Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ShellExecute and OpenProcess on Excel

Featured Replies

Hi,

I have this problem that I have been fighting with for last few days. Your help would be greatly appreciated. Currently, I am trying to migrate an application from an NT box to a Windows2003 box that has Ofiice XP loaded. The application writes into an Excel .csv file, opens it, then opens another Excel template file with macros. It then waits for the template macros to be done processing and ends. But it is not working on Windows2003. I also tried to run it on windows200 with both Office 97 and Office XP but the result is the same. Here are the symptoms.

1. szTmp = szTmplDir + "afile.csv";

pid = ShellExecute(NULL, "open", szTmp, NULL, szArchDir, SW_SHOWNA);

It opens the file successfully. But...

2. DWORD dw = GetLastError();

CHAR szBuf[80];

sprintf(szBuf, "failed: GetLastError returned %u\n", dw);

this returns an error code 126 (ERROR_MOD_NOT_FOUND).

3. HINSTANCE pid;

hXl = OpenProcess(PROCESS_ALL_ACCESS, false, (int)pid);

if (hXl == NULL)

printf("Openprocess failed\n");

OpenProcess returns NULL.

4. dw = GetLastError();

sprintf(szBuf, "failed: GetLastError returned %u\n", dw);

This returns an error code 87 (ERROR_INVALID_PARAMETER)

Please please help...

Thanks...

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.