QB64 は、QBASIC のような構文を使用できるプログラミング言語であり、C++ コードに変換されてコンパイルされます。
コードでa を使用する場合はstruct
、それを宣言して手動で作成する必要があります。32 ビットでは、WinAPI MSDN ページと一致し、ほとんど常に動作するため、問題ありません。ただし、64 ビットの場合、構造体のバイト パッキングが異なり、STARTUPINFO struct
.
struct
以下は、 32ビットで動作するための私の宣言です。struct
104 バイトにする必要があることはわかっていますが、現在 8 バイト不足しています。すべての変数が 64 ビット サイズに一致することを確認しましたが、構造体のどこかに 8 バイトのパディングがありません。バイト パッキングと WinAPI 構造体について知っている人が、これを解決するのを手伝ってくれますか?
Type STARTUPINFO
cb As Long '4 bytes
lpReserved As _Offset '4 bytes in 32, 8 in 64
lpDesktop As _Offset '4 bytes in 32, 8 in 64
lpTitle As _Offset '4 bytes in 32, 8 in 64
dwX As Long '4 bytes
dwY As Long '4 bytes
dwXSize As Long '4 bytes
dwYSize As Long '4 bytes
dwXCountChars As Long '4 bytes
dwYCountChars As Long '4 bytes
dwFillAttribute As Long '4 bytes
dwFlags As Long '4 bytes
wShowWindow As Integer '2 bytes
cbReserved2 As Integer '2 bytes
lpReserved2 As _Offset '4 bytes in 32, 8 in 64
hStdInput As _Offset '4 bytes in 32, 8 in 64
hStdOutput As _Offset '4 bytes in 32, 8 in 64
hStdError As _Offset '4 bytes in 32, 8 in 64
End Type