Compiler error for ProcessIdToSessionId
Compiler error for ProcessIdToSessionId
[Edit] Sorry, forgot that I posted about this before -> viewtopic.php?f=43&t=78145
Last edited by BarryG on Wed Mar 08, 2023 10:28 am, edited 4 times in total.
-
- Enthusiast
- Posts: 581
- Joined: Wed Sep 25, 2019 10:18 am
Re: Compiler error for ProcessIdToSessionId
Code: Select all
// !db 'ProcessIdToSessionId',0x0
db 'ProcessIdToSessionId',0x0
Mijikai Re: detect if windows session is locked
Code: Select all
PureBasic 6.01 LTS beta 4 - C Backend (Windows - x64)
Loading 'C' subsystem
Compiling D:\p2s.pb
Loading external libraries...
Starting compilation...
43 lines processed.
Error: Assembler
error: 'db' undeclared (first use in this function)
db 'ProcessIdToSessionId',0x0
^~
purebasic.c:224:1: note: each undeclared identifier is reported only once For each function it appears in
purebasic.c:224:3: error: expected ';' before '\x6f6e4964'
db 'ProcessIdToSessionId',0x0
^~~~~~~~~~~~~~~~~~~~~~~
;
purebasic.c:228:4: warning: character constant too long For its type
db 'WTSQuerySessionInformationW',0x0
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
purebasic.c:228:3: error: expected ';' before '\x696f6e57'
db 'WTSQuerySessionInformationW',0x0
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;
purebasic.c:232:4: warning: character constant too long For its type
db 'WTSFreeMemory',0x0
^~~~~~~~~~~~~~~
purebasic.c:232:3: error: expected ';' before '\x6d6f7279'
db 'WTSFreeMemory',0x0
^~~~~~~~~~~~~~~~
;
purebasic.c:136:1: error: label 'll_islocked_wtsfreememory' used but Not defined
integer p2=(integer)la_ll_islocked_wtsfreememory;
^~~~~~~
purebasic.c:132:1: error: label 'll_islocked_wtsquerysessioninformation' used but Not defined
integer p1=(integer)la_ll_islocked_wtsquerysessioninformation;
^~~~~~~
Re: [Done] Compiler error for ProcessIdToSessionId
There are already some codes here that generate different code with CompilerIf options for ASM and C-backend.
Unfortunately, I also see some that implement ASM adapted in C-backend. But these codes do not run on ARM processors. And when the first PB version for Window ARM comes (is planned in the futures), then the problems with ASM will start again.
Unfortunately, I also see some that implement ASM adapted in C-backend. But these codes do not run on ARM processors. And when the first PB version for Window ARM comes (is planned in the futures), then the problems with ASM will start again.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: [Done] Compiler error for ProcessIdToSessionId
PB ARM uses the C backend, so it shouldn't be an issue if you write a C version of your subroutine
Re: [Done] Compiler error for ProcessIdToSessionId
I am aware of that,
but some people put ASM-Intel commands in the c-backend, which then leads to errors on ARM.
I just wanted to remind you that this is not a good way.
but some people put ASM-Intel commands in the c-backend, which then leads to errors on ARM.
I just wanted to remind you that this is not a good way.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: [Done] Compiler error for ProcessIdToSessionId
Ho yes, you're totally right here.
-
- Enthusiast
- Posts: 581
- Joined: Wed Sep 25, 2019 10:18 am
Re: [Done] Compiler error for ProcessIdToSessionId
Code: Select all
; EnableASM or ! somecode(); generates an Error Message in C Backend.
CompilerIf #PB_Backend_C=#PB_Compiler_Backend
CompilerError "Inline assembler is not allowed in C backend."
CompilerEndIf