An implementation of Visual Basic that is built into Microsoft products.
Declare PtrSafe Function ShowWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As LongPtr, ByVal nCmdShow As Long) As Long
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
come converto questa funzione di Acces da Private Declare Function ShowWindow Lib "user32" _
(ByVal hWnd As Long, ByVal nCmdShow As Long) As Long in PtrSafe?
An implementation of Visual Basic that is built into Microsoft products.
Declare PtrSafe Function ShowWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As LongPtr, ByVal nCmdShow As Long) As Long
Acceptées Recommandées
Salve @Stefano Colombo ,
Grazie per la domanda.
Per convertire il codice per i nuovi sistemi a 64 bit, la parola chiave PtrSafe viene aggiunta alla dichiarazione e il parametro hWnd viene modificato da Long a LongPtr. Il tipo di dati LongPtr viene utilizzato per gestire indirizzi di memoria più ampi. Il parametro nCmdShow rimane Long perché rappresenta un valore standard, non un indirizzo di memoria.
È possibile fare riferimento al seguente esempio di codice:
Private Declare PtrSafe Function ShowWindow Lib "user32" _
(ByVal hWnd As LongPtr, ByVal nCmdShow As Long) As Long
Spero che questo risponda alla domanda. Se questa risposta è stata utile, si prega di considerare di seguire le linee guida per fornire un feedback. Grazie.