Recent Posts

Pages: [1] 2 3 ... 10
1
The Campus / Re: IPv6 structures missing?
« Last post by pcMike on Today at 02:22:40 PM »
Nevermind, I was able to call the function directly using  GetModuleHandle/GetProcAddress. :-)

2
The Campus / Re: IPv6 structures missing?
« Last post by pcMike on Today at 11:01:34 AM »
I tried to run my server under Windows XP, but I get the message:

Quote
Title:  Server.exe Entry Point Not Found:
Dialog: The procedure entry point inet_ntop could not be found in the dynamic link library ws_32.dll.

Is it possible to only load the inet_ntop from the ws_32.dll if GetVersionEx shows Windows Vista or later?


3
Easy Code IDE 32/64-bit / Fresh Install Error
« Last post by BillHudson on Today at 09:13:03 AM »
I just installed EasyCode, Started a new Project, and when I build it I get this Linker Error???

Assembling: frmMain
Linking...
LINK : fatal error LNK2023: bad DLL or entry point 'msobj140.dll'

I have searched all over online and cannot find the problem.

It is just the default form with a button on it. I tried Including User32.dll to no avail?

I loaded and successfully built the EC Clock Application

I have this system
...
iBuyPower Gaming System 64bit
8 Cores
Windows 10 Home 10.0.15063

Thank you in advance, I am at my end here...

 
4
UASM Assembler Development / Re: VARARG
« Last post by jj2007 on Today at 08:41:32 AM »
in my opinion, the default should be QWORD.

That is also my opinion, but the stupid x64 ABI says something else, as usual obfuscated in one cryptic phrase: The first four integer arguments are passed in registers.

My highlighting 8)
5
UASM Assembler Development / Re: HFILE
« Last post by jj2007 on Today at 08:25:59 AM »
File handles in Win64 are 64 bit. Either,

hFile dq ?  ; .DATA section
or
LOCAL hFile :QWORD


With the exception of the handle returned by OpenFile. Test it yourself...

include \Masm32\MasmBasic\Res\JBasic.inc
.data?
ofs OFSTRUCT <>
Init   ; OPT_64 1              ; put 0 for 32 bit, 1 for 64 bit assembly
  PrintLine Chr$("This code was assembled with ", @AsmUsed$(1), " in ", jbit$, "-bit format")
  ; int 3
  usedeb=1
  jinvoke OpenFile, Chr$("\Masm32\qEditor.exe"), addr ofs, OF_READ
  ; towards the end of OpenFile:
  ; 00000000779E0953   | 8B C7              | mov eax, edi
  mov rsi, offset ofs.szPathName
  deb 4, "Handle", rax, $Err$(), $rsi
  jinvoke CloseHandle, rax
  Inkey "hit any key"
EndOfCode


Output:
Code: [Select]
This code was assembled with ml64 in 64-bit format
Handle
rax     60
$Err$()
Operazione completata.

$rsi    C:\Masm32\qEditor.exe
hit any key
6
UASM Assembler Development / Re: HFILE
« Last post by hutch-- on Today at 08:02:47 AM »
File handles in Win64 are 64 bit. Either,

hFile dq ?  ; .DATA section
or
LOCAL hFile :QWORD
7
UASM Assembler Development / Re: HFILE
« Last post by jj2007 on Today at 07:55:47 AM »
Right. I stumbled over this some time ago, it is indeed very odd:
HFILE
Quote
A handle to a file opened by OpenFile, not CreateFile.
This type is declared in WinDef.h as follows:
typedef int HFILE;

Note the "OpenFile, not CreateFile". It seems a legacy thing...
HFILE WINAPI OpenFile(
HANDLE WINAPI CreateFile(

The VS header files obscure it, as usual, maybe these are the original definitions:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\WTypes.h
typedef INT HFILE;

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\WinNT.h
typedef PVOID HANDLE;

But there is also this definition in WinDef.h:
#ifndef _MAC
typedef int HFILE;
typedef HICON HCURSOR;      /* HICONs & HCURSORs are polymorphic */
#else
typedef short HFILE;
DECLARE_HANDLE(HCURSOR);    /* HICONs & HCURSORs are not polymorphic */
#endif

So if you are on a Mac, it's a short :biggrin:
8
UASM Assembler Development / VARARG
« Last post by Biterider on Today at 07:10:26 AM »

Hello
Today I needed to use the VARARG proc feature. I noticed that the VARARG arguments default to DWORD instead of QWORD.
Type casting the arguments solves the problem, but in my opinion, the default should be QWORD.


The dissassembly shows what I mean:
Code: [Select]
start:
 sub         rsp,38h 
 mov         dword ptr [rsp+20h],89ABCDEFh 
 mov         r9d,89ABCDEFh 
 mov         r8d,89ABCDEFh 
 mov         rdx,0B23456789ABCDEFh 
 mov         rcx,0A23456789ABCDEFh 
 call        TestProc (0331000h) 
 mov         qword ptr [rsp+20h],rdx 
 mov         r9,rcx 
 mov         r8,rbx 
 mov         rdx,rax 
 mov         rcx,0A23456789ABCDEFh 
 call        TestProc (0331000h) 
 add         rsp,38h 
 ret 
Source
Code: [Select]
.xmm
option casemap:none
option dotname
option frame:auto
option win64:8
option stackbase:rsp


.code


TestProc proc Arg1:QWORD, Arg2:VARARG
    mov r8, Arg1
    mov r9, Arg2
    ret
TestProc endp




start proc
    invoke TestProc, 0123456789ABCDEFh, QWORD ptr 0123456789ABCDEFh, 0123456789ABCDEFh, 0123456789ABCDEFh, 0123456789ABCDEFh
    invoke TestProc, 0A23456789ABCDEFh, rax, rbx, rcx, rdx
    ret
start endp


end start


Regards, Biterider
9
UASM Assembler Development / Re: HFILE
« Last post by Vortex on Today at 04:52:07 AM »
Hi Biterider,

Reading windef.h supplied with Pelles C :

Code: [Select]
typedef int HFILE;
sizeof(int)=4

Testing this Pelles C code ( 64-bit project ) :

Code: [Select]
#include <stdio.h>
#include <windows.h>

int main()
{
printf("sizeof(HFILE)=%llu",sizeof(HFILE));
return 0;
}

Output :
Code: [Select]
sizeof(HFILE)=4
10
UASM Assembler Development / HFILE
« Last post by Biterider on Today at 04:34:17 AM »
Hi
Moving some part of my old code to x64 I stumbled over the HFILE definition in WinBase.inc


Code: [Select]
_HFILE_DEFINED EQU <>
HFILE  typedef DWORD
endif


Shouldn't it be a HANDLE = 64 bit?


Regards, Biterider
Pages: [1] 2 3 ... 10