0
在所述GigE SDK C++,說明書指出GetDataPointer()的定義如下:一個指針的返回類型爲指針
PvUInt8 * PvBuffer::GetDataPointer ( )
Get the buffer's data pointer.
Const version.
Returns:
A pointer to the memory pointer.
我在我的程序像這樣使用該功能(PL見最後一行) :
PvBuffer * lBuffer = new PvBuffer();
// Create the Data (buffers are created as images, GetImage() is valid on a fresh buffer)
lBuffer->GetImage()->Alloc(1224, 1029, PvPixelMono8);
PvUInt8 *lDataBuffer = lBuffer->GetDataPointer(); //use in actual code
問題是關於PvUInt8;看這個定義,這是Buffer中的數據類型還是指針的數據類型,它總是可以是4字節(在32位機器上)或8字節(在64位機器上)。
I *認爲文檔試圖說「指向內存緩衝區的指針」,即「指向指針的指針」是一個錯字。 – molbdnilo 2012-07-05 11:14:06
那麼你的結論是什麼? – gpuguy 2012-07-05 11:15:28
PvUInt8是一個8位寬的無符號整數。 「Pv」中的「P」並不意味着「指針」 - 它是一個SDK範圍的前綴。該緩衝區包含「PvUInt8」。 – molbdnilo 2012-07-05 11:25:37