Kernel problems

Kernel, Loader, code execution and working with memory

Kernel problems

Postby AndrewThomas » Sun Sep 18, 2016 5:10 pm

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
AndrewThomas
 
Posts: 5
Joined: Sun Sep 04, 2016 6:20 pm

Re: Kernel problems

Postby X512 » Sun Sep 18, 2016 11:59 pm

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.
X512
 
Posts: 37
Joined: Sat Feb 07, 2015 2:51 pm

Re: Kernel problems

Postby Josef Templ » Mon Sep 19, 2016 6:17 am

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.
Josef Templ
 
Posts: 226
Joined: Tue Sep 17, 2013 6:50 am

Re: Kernel problems

Postby AndrewThomas » Mon Sep 19, 2016 7:15 am

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
AndrewThomas
 
Posts: 5
Joined: Sun Sep 04, 2016 6:20 pm

Re: Kernel problems

Postby Josef Templ » Mon Sep 19, 2016 7:34 am

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.
Josef Templ
 
Posts: 226
Joined: Tue Sep 17, 2013 6:50 am


Return to System

Who is online

Users browsing this forum: No registered users and 2 guests

cron