| |
|
|
 Jac de Lad | Weiß jemand, wie ich am besten ein DWORDLONG in einem Bereich definiere und auslesen kann (dann sicher am besten als Float)?
Jac  |
|
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 02.01.2009 ▲ |
|
|
|
|
 | |
|
| |
|
|
|
 Jac de Lad | Es geht hier um DWords. Die sind im Prinzip schon ziemlich long.  |
|
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 02.01.2009 ▲ |
|
|
|
|
 Michael Wodrich | |
|
| Programmieren, das spannendste Detektivspiel der Welt. | 02.01.2009 ▲ |
|
|
|
|
 Michael Wodrich | Huch, naturalmente strickt man sich aus der Struktur erst una variabile...  |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 02.01.2009 ▲ |
|
|
|
|
 Jac de Lad | Hm, jo, ich glaub das isses...gleich mal probieren.  |
|
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 02.01.2009 ▲ |
|
|
|
|
 Jac de Lad | Irgendwie noch nicht ganz: KompilierenMarkierenSeparieren {$iq}
struct Memory=dwLength&,dwMemoryLoad&,PhysLo&,PhysHi&,ullAvailPhys#(8),ullTotalPageFile#(8),ullAvailPageFile#(8),ullTotalVirtual#(8),ullAvailVirtual#(8),ullAvailExtendedVirtual#(8)
struct Memory=dwLength&,dwMemoryLoad&,ullTotalPhys#(8),ullAvailPhys#(8),ullTotalPageFile#(8),ullAvailPageFile#(8),ullTotalVirtual#(8),ullAvailVirtual#(8),ullAvailExtendedVirtual#(8)
cls
declare b#
Dim b#,Memory
GlobalMemoryStatus(b#)
b#.dwLength&=SizeOf(b#)
Print Load: +Str$(b#.dwMemoryLoad&)
Print TotalPhys: +Str$(b#.PhysHi& * 2^32 + b#.PhysLo&)
Print -Ende-
Dispose b#
w ut
Gibt bei mir immer rund -4GB negativ aus. Dabei habe ich 8GB positiv eingebaut. |
|
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 02.01.2009 ▲ |
|
|
|
|
 Michael Wodrich | Klar, siehe meinen Code. Erst in einen Float laden. Str$() kann aus der Formel nicht erkennen, daß Du gerne eine Float daraus erstellen möchtest. |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 02.01.2009 ▲ |
|
|
|
|
 Jac de Lad | KompilierenMarkierenSeparierenstruct Memory=dwLength&,dwMemoryLoad&,PhysLo&,PhysHi&,AvailLo&,AvailHi&,ullTotalPageFile#(8),ullAvailPageFile#(8),ullTotalVirtual#(8),ullAvailVirtual#(8),ullAvailExtendedVirtual#(8)
struct Memory=dwLength&,dwMemoryLoad&,ullTotalPhys#(8),ullAvailPhys#(8),ullTotalPageFile#(8),ullAvailPageFile#(8),ullTotalVirtual#(8),ullAvailVirtual#(8),ullAvailExtendedVirtual#(8)
cls
declare b#
Dim b#,Memory
GlobalMemoryStatus(b#)
b#.dwLength&=SizeOf(b#)
Print Load: +Str$(b#.dwMemoryLoad&)
Print TotalPhys: +Str$(b#.PhysHi& * 2^32 + b#.PhysLo&)
declare p1!,p2!
p1!=b#.AvailHi& * 2^32
p2!=b#.AvailLo&
Print AvailPhys: +Str$(p1! + p2!)
Print -Ende-
Dispose b#
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 02.01.2009 ▲ | |
|
|
|
|
 Michael Wodrich | Seufz. KompilierenMarkierenSeparieren {$iq}
$H f:profanincludewindows.ph
$H f:profanincludestructs.ph
struct Memory=dwLength&,dwMemoryLoad&,dwTotalPhys&,dwAvailPhys&,dwTotalPageFile&,dwAvailPageFile&,dwTotalVirtual&,dwAvailVirtual&
struct Memory=dwLength&,dwMemoryLoad&,PhysLo&,PhysHi&,ullAvailPhys#(8),ullTotalPageFile#(8),ullAvailPageFile#(8),ullTotalVirtual#(8),ullAvailVirtual#(8),ullAvailExtendedVirtual#(8)
struct Memory=dwLength&,dwMemoryLoad&,ullTotalPhys#(8),ullAvailPhys#(8),ullTotalPageFile#(8),ullAvailPageFile#(8),ullTotalVirtual#(8),ullAvailVirtual#(8),ullAvailExtendedVirtual#(8)
cls
declare b#
declare f!
Dim b#,Memory
~GlobalMemoryStatus(b#)
b#.dwLength&=SizeOf(b#)
Print Load: +Str$(b#.dwMemoryLoad&)
f! = b#.PhysHi& * 2^16 + b#.PhysLo&
Print TotalPhys: +Format$(#,0,b#.dwTotalPhys&)+ Bytes
Print TotalPhys: +Format$(#,0,b#.dwTotalPhys&/1024)+ KB
Print TotalPhys: +Format$(#,0,b#.dwTotalPhys&/(1024^2))+ MB
Print TotalPhys: +Format$(#,0,b#.dwTotalPhys&/(1024^3))+ GB
Print -Ende-
Dispose b#
waitinput
end
Das da sind aber keine longlong, sondern einfache LONG
typedef struct _MEMORYSTATUS {// mst
DWORD dwLength;// sizeof(MEMORYSTATUS)
DWORD dwMemoryLoad;// percent of memory in use
DWORD dwTotalPhys;// bytes of physical memory
DWORD dwAvailPhys;// free physical memory bytes
DWORD dwTotalPageFile;// bytes of paging file
DWORD dwAvailPageFile;// free bytes of paging file
DWORD dwTotalVirtual;// user bytes of address space
DWORD dwAvailVirtual;// free user bytes
} MEMORYSTATUS, *LPMEMORYSTATUS;
|
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 02.01.2009 ▲ |
|
|
|
|
 Jac de Lad | Nein eben nicht! GlobalMemoryStatus kommt nicht mit 8GB klar, deswegen gibts ja GlobalMemoryStatusEx! |
|
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 02.01.2009 ▲ |
|
|
|
|
 Michael Wodrich | Geb doch mal die Quelle an, wo Du die Struktur her hast... |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 02.01.2009 ▲ |
|
|
|