OI32 and Kernel 32 error (OpenInsight)
At 25 FEB 2002 05:09:57PM Nick Stevenson wrote:
I have a clean, new install of NTWS 4.00, SP 6. I install the OI4.0 upgrade over my virginal OI3.7.5 version without any problems. As soon as I run OINSIGHT.EXE I get the error "The procedure entry point GetFileTypi could not be located in the dynamic link library KERNEL32.dll"
My KERNEL32.dll is dated November 18, 1999 and is 375,056 bytes. Can you tell me if this is the correct version?
At 25 FEB 2002 05:45PM Pat McNerthney wrote:
Nick,
There is not a "GetFileTypi", but there is a "GetFileType" in kernel32.dll. Is this a typo or the problem?Pat
At 25 FEB 2002 07:09PM Oystein Reigem wrote:
GetFileTypo?
At 25 FEB 2002 08:13PM Richard Bright wrote:
He needs to correct the prototype in his DLL_KERNEL32 viz
Function GetFileType Lib "kernel32" (ByVal hFile As Long) As Long
ยท hFile
Identifies an open file handle.
Protyped in DLL_KERNEL32 as -
LONG STDCALL GetFileType(HANDLE)
* Also need Equates in SSP
* The return value is one of the following values:
Equ FILE_TYPE_UNKNOWN$ to 'FILE_TYPE_UNKNOWN=0
; * The type of the specified file is unknown.
Equ FILE_TYPE_DISK$ to 1
; *The specified file is a disk file.
Equ FILE_TYPE_CHAR$ to 2
; *The specified file is a character file, typically an LPT device or a console.
Equ FILE_TYPE_PIPE$ to 3
; *The specified file is either a named or anonymous pipe.
Richard Bright
r.bright@ark.co.nz
At 25 FEB 2002 08:14PM Nick Stevenson wrote:
Nope, no typo. If I could cut and paste I would, but I can't. It is a definite 'GetFileTypi'.
At 25 FEB 2002 08:17PM Richard Bright wrote:
Nick,
Cant find GetFileTypi in the standard documentation. I'm using API Viewer 2001.
Richard
At 25 FEB 2002 08:23PM Nick Stevenson wrote:
Richard
This is the content of my dll_kernel32:
KERNEL32
UINT STDCALL WinExec(LPCHAR,UINT)
ULONG STDCALL GetPrivateProfileStringA(LPCHAR,LPCHAR,LPCHAR,LPCHAR,ULONG,LPCHAR) AS GETPRIVATEPROFILESTRING
ULONG STDCALL GetPrivateProfileStringA(LPCHAR,LPVOID,LPCHAR,LPCHAR,ULONG,LPCHAR) AS GETPRIVATEPROFILESECTION
UINT STDCALL GetProfileIntA(LPCHAR,LPCHAR,INT) AS GETPROFILEINT
INT STDCALL WritePrivateProfileStringA(LPCHAR,LPCHAR,LPCHAR,LPCHAR) AS WRITEPRIVATEPROFILESTRING
INT STDCALL WriteProfileStringA(LPCHAR,LPCHAR,LPCHAR) AS WRITEPROFILESTRING
HANDLE STDCALL LoadLibraryA(LPCHAR) AS LOADLIBRARY
INT STDCALL FreeLibrary(HANDLE)
UINT STDCALL SetErrorMode(UINT)
UINT STDCALL GetWindowsDirectoryA(LPCHAR, UINT) AS GETWINDOWSDIRECTORY
ULONG STDCALL GetTickCount(VOID)
As you can see, no GetFileTypi. The only way I could get to this was by running Access.exe and opening the record in SYSPROCS.
Mystery!
At 25 FEB 2002 08:27PM Richard Bright wrote:
Pat,
BTW I seem to get phantom functions created whenever I have declared a prototyped function in a SSP and then compile the SSP. That is a SSP source entity is created in the account for that function (but empty) - but no executable.
This is no true of DLL functions that where converted as part of the upgrade.
At first I thought that this abberation vas due to a wrong typing of my DLL, but now think it a repository issue with the Declare_Fcns.
Richard Bright
At 25 FEB 2002 08:31PM Richard Bright wrote:
Yes, Your DLL_KERNEL32 is the default standard. Have a squizze at the rest of your DLL's.
Mmm. You are able to load OI to get up and running. Any chance that some routine is being loaded that makes this strange call?
Richard
At 25 FEB 2002 08:43PM Nick Stevenson wrote:
Well I did have a problem with CTL3D32.DLL which I had to copy off another NT4 machine. What I find strange is that this is a brand new, clean build of NT4 WS (SP6) and that it ended up with a different CTL3D32.dll to another machine!
The error comes up almost immediately after I run OINSIGHT.EXE. The splash screen hasn't yet appeared.
I agree that it looks like a typing error, but where on earth is it coming from????
At 25 FEB 2002 09:20PM Richard Bright wrote:
Lokks like this is something that Pat or Mike are better equipped to deal with. MY gut feel is that you have a screwed DLL in winsys or win32 folder - but not part of OI components.
You might want to try a re-instal. Otherwise its lookingfor your screwed dll.
BTW you mentioned that you had to add dll from other system. I'm wondering if it is registered in registry. Another thought - maybe it is a screw in the registry.
Richard
At 25 FEB 2002 10:18PM Pat McNerthney wrote:
Nick,
I searched the entire OI source code tree and can find no instances of GetFileType being used, at all, anywhere. It is possible that a dll OpenInsight uses, uses GetFileType and is corrupted, causing the error.Can you run OpenEngine by itself?Also, a screen shot showing exactly how the error is being displayed might help.Pat
At 25 FEB 2002 10:20PM Pat McNerthney wrote:
Mike!
I think this one is in your domain...Pat
At 26 FEB 2002 12:01AM Mike Ruane wrote:
Richard-
Can you explain this again? I know if I have a declaration for a function named foobar in a program, when I conpile the function, I get a stored proedure listing for that function, but the function doesn't really exist. OI16 and OI32.
Are you saying the same happend for DLLs ?
At 26 FEB 2002 01:13AM Richard Bright wrote:
Correct.
That is ONLY happened with new dlls that I add to the system. So my first question to myself(and reservation) has been - have I got the dll structure wrong. But the Declare_Fcns certainly did its stuff and message confirmed the specific dlls as being added. Further, the dlls work (well, kind of! but that may be a different issue).
Richard
At 26 FEB 2002 02:36AM Bob Watson wrote:
Richard
Are you sure the phantom files are not hangovers from the old system. After cleaning out all references to my own dll's in sysobj I reentered the 32bit ones and then redeclared them (in sysprog). I get no extra files being created for the application I'm in when I use them.
Bob Watson
At 26 FEB 2002 05:54AM Nick Stevenson wrote:
Hi Guys
I tried a re-install of the OI upgrade (several times). Same problem. Then I downloaded the OI401 upgrade again, and hey presto! it worked. Something must have got corrupted in my first download. I've still got the first one, so I suppose I could try it again or compare the files to be sure. Anyhow, I'm now on the road. Thanks for all your assistance.
At 26 FEB 2002 04:37PM Richard Bright wrote:
Bob,
These are completely new KERNEL32 Dlls prototypes. If I use a pre-existing function like GetTickCount() - that is OK. I do not discount that I have incorrect prototype structures but I am getting results from these declared functions.
Richard
At 26 FEB 2002 10:02PM Bob Watson wrote:
Richard
Yes these are as well. Like
ULONG STDCALL GetEnvironmentVariableA(LPCHAR, LPCHAR, ULONG) AS GETENVIRONMENTVARIABLE - a handy one for getting any dos environment variable. No phantoms are created.
Bob Watson
At 27 FEB 2002 08:38AM Richard Bright wrote:
Bob,
Cut and pasted your GetEnvironmentVariable into DLL_KERNEL32 - as per your post. Saved record. Then RUN DECLARE_FNCS 'DLL_KERNEL32' and got confirmation of ressolution of DLLs. (All this in SYSPROG)
Change to inherited account (not that that matters)
Create the following SSP -
Subroutine Atest(Dummy) Declare function GetEnvironmentVariable X=1 Return
Compiled the SSP. Refresh SSP list and - yes a phantom GetEnvironmentVariable SSP appears.
So if you are not having this problem, then the issue must be with my system. At least the issue would by inference appear unrelated to the typing of the dll.
Will try a new virgin OI16 and redo upgrade.
With patience and perserverance will get there!
Richard Bright
At 28 FEB 2002 11:14PM Bob Watson wrote:
Richard
Strange, I declare it once as below - SYSOBJ has one row $GETENVIRONMENTVARIABLE, and SYSPROCS have no reference to it.
* compile function GetEnvironment(item, ucase) declare function GetEnvironmentVariable result=str(' ', 255) lenResult=GetEnvironmentVariable(item:\00\, RESULT, len(result)) if lenResult ] 0 then result=result1,lenResult end else result=' end if ucase then convert @lower_case to @upper_case in result end return result *
Bob Watson
At 04 MAR 2002 07:02PM Richard Bright wrote:
Bob,
Likewise with my system BUT a record is created in SYSREPOS when the SSP is compiled - this is what I mean by 'phantom' - there is no matching SYSPROCS value - it is this SYSREPOS value that appears in the SSP dropdown list.
I have tried this whole exercise in a second (Different) OI system - same result.
BTW this is all on a WinXP O/S.
Richard Bright
At 05 MAR 2002 07:18AM Richard Bright wrote:
Bob,
I had other developers confirm my observation of the phantom function. That is when a SSP is compiled that contains a user - added API call, a record is incorrectly created in SYSREPOS - corresponding to the function. No SYSPROCS record is created. Thus when we use the SSP dropdown we see the function, and selecting it returns the error message of not found / or whatever.
I believe this is a problem largely cosmetic in nature - doubt if it has any impact on the function of the SSP.
Richard Bright
r.bright@ark.co.nz