Author Topic: converting a program from windows 7 to windows 10  (Read 415 times)

shankle

  • Member
  • ****
  • Posts: 857
converting a program from windows 7 to windows 10
« on: August 26, 2020, 01:54:27 AM »
            8-25-2020

stats: windows 10 pro 64-bit
       GoAsm, Going from windows 7 to windows 10
.code
start:
149   invoke [GetModuleHandleA], NULL ; this is the line giving the error
150                                     with or without the square brackets
160   mov    Q[hInstance],rax

   Line 149 of assembler source file shdc61.asm.  use square brackets to
   address memory, address or offset to get address.
        Thanks for any help.

wjr

  • Member
  • **
  • Posts: 221
    • WJR's website
Re: converting a program from windows 7 to windows 10
« Reply #1 on: August 26, 2020, 02:41:11 AM »
It looks like the symbol NULL has not been defined, so perhaps missing an #include file.

shankle

  • Member
  • ****
  • Posts: 857
Re: converting a program from windows 7 to windows 10
« Reply #2 on: August 26, 2020, 07:09:56 AM »
Thank you WJR for responding.
All my programs in windows 7 were written in GoAsm, none
of which had brackets around  NULL. I enclosed NULL in
brackets and the error is gone.
I don't understand and have never read anything about
enclosing NULL in brackets.

Evidently there are a lot of changes from windows 7 to windows 10.
Here is a problem, with "wndclassexa".
Would someone be so kind as to give some book of where to read
about this problem or some code examples  Please.

WinMain:
    FRAME hInst,hPrevInst,CmdLine,CmdShow,vInst
   LOCAL wc: WNDCLASSEXA ],msg,hWnd,HWND,RR:RECT

   mov   D[wc.cbSize],SIZEOF WNDCLASSEXA
   mov   D[wc.style],CS_BYTEALIGNWINDOW | CS_HREDRAW | CS_VREDRAW
   mov   rax,offset WndProc
   mov   Q[wc.lpfnWndProc],rax
   mov   D[wc.cbClsExtra],NULL
   mov   D[wc.cbWndExtra],NULL
   push  [hInst]
   pop   [wc.hInstance]
   invoke LoadIcon,NULL,IDI_APPLICATION
   mov   Q[wc.hIcon],rax
    invoke LoadCursor,NULL,IDC_ARROW
   mov   Q[wc.hCursor],rax
   invoke CreateSolidBrush,00ffffffh      ; white background
    mov   Q[hBrush],rax
   mov   Q[wc.hbrBackground],rax
   mov   Q[wc.lpszMenuName],NULL
   mov   Q[wc.lpszClassName],offset szDisplayName
   mov   Q[wc.hIconSm],0

    invoke RegisterClassEx, addr wc
« Last Edit: August 30, 2020, 02:03:16 AM by shankle »

wjr

  • Member
  • **
  • Posts: 221
    • WJR's website
Re: converting a program from windows 7 to windows 10
« Reply #3 on: September 01, 2020, 09:58:19 AM »
If you had a 64-bit program that you could build and run on Windows 7, then most likely it should build and run on Windows 10.

NULL should not be in square brackets. The error has just been pushed off as an external symbol that the linker is not going to find. If you have used #include windows.h, and if needed setup your INCLUDE environment string properly, then GoAsm should find the definition for NULL.

As for the "wndclassexa" problem, you do not mention the error, but there shouldn't be a ] after LOCAL wc:WNDCLASSEXA.

TouEnMasm

  • Member
  • *****
  • Posts: 1501
    • EditMasm
Re: converting a program from windows 7 to windows 10
« Reply #4 on: September 01, 2020, 04:40:24 PM »
hello,
sorry,i have not see that you want convert your source fron goasm to goasm
[content deleted]
Fa is a musical note to play with CL