Re: Pointer auf ein Byte-Array

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Herfried K. Wagner [MVP] (hirf-spam-me-here_at_gmx.at)
Date: 10/13/04


Date: Wed, 13 Oct 2004 14:06:34 +0200

Hallo Hubert!

"Hubert Holler" <haiflosse@gmx.net> schrieb:
> Es handelt sich um ein SDK für Fingerprint und da werden
>> > C++ Klassen in VB verwendet. Diese Klassen können nur mit
>> > Pointer arbeiten. Somit muss ich dieser Funktion einen Pointer
>> > übergeben.
>>
>> Eventuell kannst du dir mit 'VarPtr' einen Zeiger auf das erste Element
>> im
>> Array holen und diesen übergeben? Irgendwo muss dann noch die Länge der
>> Daten im Array übergeben werden.
>>
>
> Der Funktion VarPtr muss ich bereits einen Pointer übergeben.

Warum "musst" du das?

\\\
Dim abyt(0 To 10) As Byte
Dim ptr As Long
ptr = VarPtr(abyt(0))
///

-- 
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/> 


Relevant Pages

  • Re: Detecting a running process.
    ... Private Declare Function EnumProcessModules Lib "psapi.dll" _ ... (ByVal dwProcessID As Long, _ ... Dim nProcesses As Long ... 'fill an array of longs with the ...
    (microsoft.public.vb.winapi)
  • Re: Updated datestamp doesnt work
    ... Public Sub StoreMyOldVals ... ' store values of current row in array ... Dim dbs As DAO.Database, rst As DAO.Recordset ... Dim var As Variant ...
    (microsoft.public.access.gettingstarted)
  • Re: Updated datestamp doesnt work
    ... Public Sub StoreMyOldVals ... ' store values of current row in array ... Dim dbs As DAO.Database, rst As DAO.Recordset ... Dim var As Variant ...
    (microsoft.public.access.gettingstarted)
  • Re: Updated datestamp doesnt work
    ... Public Sub StoreMyOldVals ... ' store values of current row in array ... Dim dbs As DAO.Database, rst As DAO.Recordset ... Dim var As Variant ...
    (microsoft.public.access.gettingstarted)
  • Re: Max/Min Functions
    ... You said the Array function won't work here. ... Dim myArray() As Variant ... > Dim vMax As Variant ...
    (microsoft.public.word.vba.general)