Pelles C forum

Assembly language => Assembly discussions => Topic started by: Vortex on January 11, 2026, 06:34:18 PM

Title: Windows domain membership
Post by: Vortex on January 11, 2026, 06:34:18 PM
This quick code checks if your computer is a member of a domain :

include IsDomainMemb.inc

.data

m1  db 'The computer is not joined to a domain.',0
m2  db 'The computer is joined to a domain.',0
tbl dd OFFSET m1,OFFSET m2

.code

start:

    invoke  IsOS,OS_DOMAINMEMBER

    xor     ecx,ecx
    test    eax,eax
    setne   cl
    push    ecx
    shl     ecx,2
    lea     edx,[tbl+ecx]

    invoke  StdOut,DWORD PTR [edx]

    pop     eax
    invoke  ExitProcess,eax
Title: Re: Windows domain membership
Post by: Marco on January 12, 2026, 11:46:39 AM
Hi Vortex,

Although I wrote some programs in pure assembly language in 1992, it is not my area of expertise. Nevertheless, I would like to thank you for consistently providing new examples.

Marco