News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Dll problems

Started by HSE, August 15, 2023, 01:05:16 AM

Previous topic - Next topic

HSE

Hi Biterider!

Raymond tridoku is to hard, then I'm playing with something easiest  :biggrin:

Because there is a leak in my modification of CodeEdit I'm playing with Resguard, but in 64 bits.

One problem is: OCall offset CallDataPool::DataPool.Init, NULL, sizeof CALLDATA, 698, 4
build:
00007FFD0F974C12 | 48 B9 C0 66 9D 0F FD 7F  | movabs rcx,<resguard.CallDataPool>      | ;ResGuard.asm:1554
00007FFD0F974C1C | 48 83 EC 30              | sub rsp,30                              |
00007FFD0F974C20 | 33 D2                    | xor edx,edx                             |
00007FFD0F974C22 | 41 B8 B0 00 00 00        | mov r8d,B0                              |
00007FFD0F974C28 | 41 B9 BA 02 00 00        | mov r9d,2BA                             |
00007FFD0F974C2E | C7 44 24 20 04 00 00 00  | mov dword ptr ss:[rsp+20],4             |
00007FFD0F974C36 | FF 14 25 00 4C 8B 19     | call qword ptr ds:[198B4C00]            |
00007FFD0F974C3D | 41 FF 53 E8              | call qword ptr ds:[r11-18]              |

instead of expected:
00007FFCF9264C33 | 48 B9 C0 66 2C F9 FC 7F  | movabs rcx,<resguard.CallDataPool>      | ;ResGuard.asm:1555
00007FFCF9264C3D | 48 83 EC 30              | sub rsp,30                              | ;ResGuard.asm:1556
00007FFCF9264C41 | 33 D2                    | xor edx,edx                             | ;ResGuard.asm:1557
00007FFCF9264C43 | 41 B8 B0 00 00 00        | mov r8d,B0                              | ;ResGuard.asm:1558
00007FFCF9264C49 | 41 B9 BA 02 00 00        | mov r9d,2BA                             | ;ResGuard.asm:1559
00007FFCF9264C4F | C7 44 24 20 04 00 00 00  | mov dword ptr ss:[rsp+20],4             | ;ResGuard.asm:1560
00007FFCF9264C57 | 4C 8B 19                 | mov r11,qword ptr ds:[rcx]              | ;ResGuard.asm:1561
00007FFCF9264C5A | 41 FF 53 E8              | call qword ptr ds:[r11-18]              | ;ResGuard.asm:1562

Other problem is that [r11-18] is pointing nowhere  :biggrin:

Perhaps is wrong:.data
     CallDataPool      $Obj(DataPool)         {}

Thanks in advance, HSE.
Equations in Assembly: SmplMath

Biterider

Hi HSE

This call
OCall offset CallDataPool::DataPool.Init, NULL, sizeof CALLDATA, 698, 4
looks a bit strange, in particular  "OCall offset CallDataPool"

What is CallDataPool? Maybe a template? 
Can you send me bit more code to understand the situation?  :thumbsup:

Biterider

HSE

:biggrin:

Quote from: Biterider on August 15, 2023, 03:23:53 AMlooks a bit strange, in particular  "OCall offset CallDataPool"

Perhaps 18 years of dust make that effect  :thumbsup:

Quote from: Biterider on August 15, 2023, 03:23:53 AMWhat is CallDataPool? Maybe a template?

I show that in the post.


File is essentially ObjAsm32 Resguard.asm

Now I'm searching for some DLL example, but not one in ObjAsm.
Equations in Assembly: SmplMath

Biterider

Hi HSE
I had to look into Demo1C myself to check how it should work properly.  :biggrin:
Here is an example showing the use of $ObjInst using the current framework. This macro initialises the memory area with all the required settings from the source template. 

Remember not to call "Destroy" at the end, a simple .Done is enough for an Object in the .data section.

% include @Environ(OBJASM_PATH)\Code\Macros\Model.inc
SysSetup OOP, NUI64, ANSI_STRING, DEBUG(WND)

MakeObjects Primer

.data
MyObj  $ObjInst(Primer)

.code
start proc
  SysInit
  OCall MyObj::Primer.Init, NULL
  SysDone

  invoke ExitProcess, 0
start endp

end

Biterider

HSE

 :thumbsup:  [r11-18] look perfect now.

OCall work perfectly in Demo01C, but still fail here :biggrin: .

Thanks.
Equations in Assembly: SmplMath

Biterider

Hi HSE
OK, I need more of your code to check what is going wrong. 
What version of the framework are you using?
Does the snippet from the previous post work for you? 

Thanks, Biterider

HSE

Hi Biterider

It's a collision between OCall and Smplmath, probably new macros. To find that will be a lot of fun  :biggrin:

Thanks  :thumbsup: ,
HSE
Equations in Assembly: SmplMath

HSE

 :biggrin:  :biggrin:  Include for Double Double Precision and Complex Numbers library have JWASM options!! Invisible things in tests using ML64.
Equations in Assembly: SmplMath