Kernel problems

Kernel, Loader, code execution and working with memory
Post Reply
AndrewThomas
Posts: 5
Joined: Sun Sep 04, 2016 6:20 pm

Kernel problems

Post by AndrewThomas »

What libraries does the Kernel import. The source code to the Kernel imports WinAPI but looking at the compiled code
it appears to use USER32, Kernel32 and OLE32. I am not sure what I am doing wrong but I can not make use of the Kernel module.
I get inconsistent import errors.

Regards

Andrew
X512
Posts: 72
Joined: Sat Feb 07, 2015 2:51 pm

Re: Kernel problems

Post by X512 »

What platform are you using (Windows, Unix like)? What command and arguments of DevLinker are you using?
WinApi is a module, that provide type information for various windows DLLs. It is not regular module and it hasn't code file. Header begins with "MODULE WinApi ["KERNEL32.dll"];" so procedures are imported from KERNEL32.dll by default, but imported DLL and DLL symbol name nan be redefined by following syntax: PROCEDURE SendMessage* ["USER32.dll", "SendMessageA"]
In this case SendMessage is SendMessageA symbol from USER32.dll DLL module. See Platform-Specific Issues from BlackBox help.
Josef Templ
Posts: 262
Joined: Tue Sep 17, 2013 6:50 am

Re: Kernel problems

Post by Josef Templ »

AndrewThomas wrote:What libraries does the Kernel import. The source code to the Kernel imports WinAPI but looking at the compiled code
it appears to use USER32, Kernel32 and OLE32. I am not sure what I am doing wrong but I can not make use of the Kernel module.
I get inconsistent import errors.

Regards

Andrew
The Kernel module is statically linked with the .exe file.
"inconsistent import errors" are not related with DLLs but with
BlackBox module inconsistencies. The linked Kernel module may be different from
the latest Kernel symbol file used by other modules.
You probably have to relink your application.
AndrewThomas
Posts: 5
Joined: Sun Sep 04, 2016 6:20 pm

Re: Kernel problems

Post by AndrewThomas »

Josef, thanks for the reply. I was starting to suspect that the Kernel linked into the BB exe was different
to the one in the source code distribution. I think the issue might be with Kernel.name. Is this a CHAR string
or a SHORTCHAR string?

Andrew
Josef Templ
Posts: 262
Joined: Tue Sep 17, 2013 6:50 am

Re: Kernel problems

Post by Josef Templ »

AndrewThomas wrote:Josef, thanks for the reply. I was starting to suspect that the Kernel linked into the BB exe was different
to the one in the source code distribution. I think the issue might be with Kernel.name. Is this a CHAR string
or a SHORTCHAR string?

Andrew
If you are migrating to 1.7, then Kernel.Name ist now of CHAR, whereas the new type Kernel.Utf8Name is of SHORTCHAR.
Name* = ARRAY nameLen OF CHAR;
Utf8Name* = ARRAY nameLen OF SHORTCHAR;

The Kernel uses both at different places.

In the 1.7 release the linked BlackBox.exe and the most current sources should be consistent.
If you have an older .exe file it may be inconsistent and you must recompile it and relink it.
Post Reply