English
Forum

nproc / sizeof / DrawText / Structures

 
- Page 1 -



Ernst
Why bleats XPSE with the function sizeof  in a nproc
( warning: undeklarierte function : SIZEOF )
too {$pushkeyword sizeof} helps not
 
05/05/14  
 



 
- Page 1 -



Ernst
@Nico - funkt unfortunately not
The APIs write I gewohnheitsmäßig always with the Tilde; there one but these in xpse omit can, lying Maybe even therein the trouble. xpse can therefore obviously not between eigenem drawtext and api-drawtext discern and wants only 4 Parameter. Gibts for Perhaps a workaround ?

involved the Structures have I among other things too very these Variante already attempts - negative, but now is it me clear warum; I hab's within of/ one nProc attempts.

sizeof  -trouble: have I you there correctly. understood, that $pushkeyword with nProcs none Einfluss has, and ebenn only self defined, xpse-own and api-functions applied go can - there really for sizeof a adäquate (short) api-function ?
Greeting serious
 
05/06/14  
 




E.T.

{$iq}
{pushkeyword sizeof}


already time with

{$iq}
{$pushkeyword sizeof}

attempts
 
XProfan X2
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
05/06/14  
 




Ernst
@E.T.
was only one mistake in writing
have it already with {$pushkeyword sizeof} attempts (see my first question)

Nachtrag @Nico
i'm now clear, Why not functions has, because I all this within
of/ one nProc unterbringen wished - goes hold not.
"workaround" for Textausrichtung have I me already Done.
 
05/06/14  
 




Nico
Madysa
serious (06.05.14)
sizeof -trouble: have I you there correctly. understood, that $pushkeyword with nProcs none Einfluss has, and ebenn only self defined, xpse-own and api-functions applied go can


The Kompilerdirektive PUSHKEYWORD existing from Kompatibilitätsgründen and assure XPSE, that a gewisse function present is, though tappt im dunkeln XPSE not famous is -- to that example, because the function first in a neueren XProfan-Version installed been is.

within NProcs must You but no XProfan-functions use. use can you only WinAPI-functions and functions, The in the XPSE-reference [...]  definiert are. you see sure, that there manches missing.

serious (06.05.14)
there really for sizeof a adäquate (short) api-function ?
Greeting serious


Yes, GlobalSize . The problem is, I do not white, whether GlobalSize something with XProfan-own Memory-Variables to begin white. this is the reason for, I recommended have, within NProcs fundamentally only with GlobalAlloc  erstellte Speicherbereiche To use. tappt im dunkeln afford a almost same Funktionalität what about me can me hereon leave, that they make, what tappt im dunkeln should.
 
05/08/14  
 




Findus
serious (06.05.14)
@Nico - funkt unfortunately not
The APIs write I gewohnheitsmäßig always with the Tilde; there one but these in xpse omit can, lying Maybe even therein the trouble. xpse can therefore obviously not between eigenem drawtext and api-drawtext discern and wants only 4 Parameter. Gibts for Perhaps a workaround ?


In this case lying the sooner on it the it The function too again as xpse function gives directly of xpse: [...] 

there's the 4. parameter one string.

If you zentrierten Text want etc then can you Yes times the drawtextex api use because The goes well for.

but not globalfree etc would I The xpse functions take The as XProfan functions lauten means dim and dispose, The weg too in nprocs and are there too gelistet. [...] 
 
05/09/14  
 




Ernst
Findus (09.05.14)
If you zentrierten Text want etc then can you Yes times the drawtextex api use because The goes well for.

very the ist’s (i was To heavy on drawtext fixes) – thanks
Findus (09.05.14)
but not globalfree etc would I The xpse functions take The as XProfan functions lauten means dim and dispose, The weg too in nprocs and are there too gelistet.

dim and dispose use I ohnedies, but me went/goes it around the sizeof 
usually would I write
textlen& = ~GetWindowText(hWnd&, Text#, sizeof(#)-1)
but How mach I it in a nproc, The sizeof not knows – and a suitable api Have so did i not found
 
05/09/14  
 




Nico
Madysa
Findus (09.05.14)
but not globalfree etc would I The xpse functions take The as XProfan functions lauten means dim and dispose, The weg too in nprocs and are there too gelistet. [...] 


Hoppla, there Have I getrieft and the reference not correctly. red.

serious (09.05.14)
dim and dispose use I ohnedies, but me went/goes it around the sizeof
usually would I write
textlen& = ~GetWindowText(hWnd&, Text#, sizeof(#)-1)
but How mach I it in a nproc, The sizeof not knows ? and a suitable api Have so did i not found


I can very well present, that XPSEs Dim- and Dispose-functions only Wrapper circa GlobalAlloc and GlobalFree are.
look still simply time, whether the following code the expected Result outputs:
nproc TestGlobalSize

    parameters sizeOfMem&
    var mem& = Dim(sizeOfMem&)
    var result& = GlobalSize(mem&)
    Dispose(mem&)
    return result&

endproc

proc assert

    parameters param&
    print param&,
    print if(TestGlobalSize(param&) = param&, "OK", "Fail!")

endproc

cls
assert(4)
assert(23)
assert(42)
waitinput
end
 
05/10/14  
 




Ernst
mistake in writing:
textlen& = ~GetWindowText(hWnd&, Text#, sizeof(#)-1) ought to his:
textlen& = ~GetWindowText(hWnd&, Text#, sizeof(Text#)-1)

@Nico: anyway is globalsize  exakt The api, The I sought having.
long Text=dim(255)
var textlen& = ~GetWindowText(hWnd&,Text,~GlobalSize(Text)-1)
thanks
 
05/10/14  
 



 
- Page 2 -



Ernst
remaining only yet the point Struktur;
is it at all possible within of/ one nProc a structure To transfer?
outside the nProc z.B.
but inside the nProc with all possible and impossible Syntaxvariationen The warning, that it a Kollision with the structure (xyz) gives.
Can now only memory in entsprechender Size dimensionieren, without definitiv a Structur To transfer, or ... - but How???
 
05/17/14  
 




Nico
Madysa
i know straight not very, what You make want, but if I me right entsinne, can you Speicherbereichen within NProcs no structure aufdrücken.

has iF never installed.

so far I know, goes the Access to arbitrary Speicherbereiche only with Set/GetLong and its in-laws.
 
05/17/14  
 




Ernst
I hab's me virtual, but I wished it confirm know.
thanks
 
05/17/14  
 



one can simply The address of/ one structure transfer and then Yes directly The values from memory reading and write. Structures describe Yes only the structure one Speichers.
 
07/09/14  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

20.714 Views

Untitledvor 0 min.
p.specht12/05/17
Ernst06/24/16
Wilfried06/02/16
funkheld04/11/16
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie