Click here to Skip to main content
15,886,017 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
trapping error before sub or function
using a declare
DECLARE FUNCTION GetProfilesDirectoryA IMPORT "USERENV.DLL" ALIAS "GetProfilesDirectoryA" ( _
BYREF lpProfilesDir AS ASCIIZ _ ' __out LPSTR lpProfilesDir
, BYREF lpcchSize AS DWORD _ ' __inout LPDWORD lpcchSize
) AS LONG

userenv.dll is not in system32 on my windows 10 pro 64bit
the file is in wow64
my computer will not redirect to that folder
add a path in computer path statement and it finds the file
how can I trap error before any executable code aka
Function pbmain or any sub

i am using powerbasic win 1003

What I have tried:

#debug on
#debug on error
all seems to work in executable code area
Posted
Updated 26-Feb-21 9:28am

1 solution

On Windows 10 64-bit, there's two versions of the .DLL. One is in System32 and the other is in SysWOW64.

If the file is missing from system32, you might want to investigate that with Using System File Checker in Windows 10[^]

Your machine seems to have more issues that that if you have to put System32 and SysWOW64 back into the PATH environment variable.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900