Click here to Skip to main content
15,896,154 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: checking black pixels then counting them Pin
Dave Kreskowiak10-Jun-13 1:28
mveDave Kreskowiak10-Jun-13 1:28 
GeneralRe: checking black pixels then counting them Pin
sharief hussien VB10-Jun-13 2:26
sharief hussien VB10-Jun-13 2:26 
GeneralRe: checking black pixels then counting them Pin
Dave Kreskowiak10-Jun-13 3:58
mveDave Kreskowiak10-Jun-13 3:58 
GeneralRe: checking black pixels then counting them Pin
sharief hussien VB10-Jun-13 4:18
sharief hussien VB10-Jun-13 4:18 
GeneralRe: checking black pixels then counting them Pin
Dave Kreskowiak10-Jun-13 7:39
mveDave Kreskowiak10-Jun-13 7:39 
QuestionFilter the data from excel using VB Pin
R@M-ITcian8-Jun-13 18:32
R@M-ITcian8-Jun-13 18:32 
AnswerRe: Filter the data from excel using VB Pin
Richard MacCutchan8-Jun-13 21:56
mveRichard MacCutchan8-Jun-13 21:56 
QuestionIntPtr and API functions Pin
treddie8-Jun-13 17:03
treddie8-Jun-13 17:03 
Hi.

I'm not sure whether or not this thread should go here or over in the API section, except that it involves declarations that are definitely vb.Net.

Anyway, my questions revolve around the use of IntPtr. My first thought was that since I needed to pass pointers to win32 functions, I needed to restrict myself to 32bit values. Therefore, it seems that IntPtr is only applicable when on a 32bit system. If a pointer is declared as IntPtr on a 64bit system, vb.Net is clever enough to make IntPtr fit the 64bitwidth of the current system. That makes it unusable for win32 functions because they can only deal with 32bit values. So then I thought, well, I'll switch to using UInt32, so that the API is accessible with a 32bit pointer. But then I thought, hm, that would be fine as far as the API function is concerned, but would create a problem when an API function returns a 32bit encoded address to a memory location on a 64bit system! So that seems to suggest that when you get the pointer out of the function, that it needs to be widened to a 64bit pointer so that the data there can be properly found and retrieved. So my questions are:
1. Is this logic basically correct?

2. Is IntPtr really nothing more than UInt32 or UInt64,
depending on the bitwidth of the system?

3. Again, if all of this is correct, is casting or
marshaling required to narrow and widen the pointer
when a conversion is necessary?

modified 8-Jun-13 23:14pm.

AnswerRe: IntPtr and API functions Pin
Richard MacCutchan8-Jun-13 21:55
mveRichard MacCutchan8-Jun-13 21:55 
GeneralRe: IntPtr and API functions Pin
treddie8-Jun-13 23:39
treddie8-Jun-13 23:39 
GeneralRe: IntPtr and API functions Pin
Richard MacCutchan8-Jun-13 23:41
mveRichard MacCutchan8-Jun-13 23:41 
GeneralRe: IntPtr and API functions Pin
treddie9-Jun-13 8:11
treddie9-Jun-13 8:11 
GeneralRe: IntPtr and API functions Pin
Richard MacCutchan9-Jun-13 9:25
mveRichard MacCutchan9-Jun-13 9:25 
GeneralRe: IntPtr and API functions Pin
treddie9-Jun-13 11:44
treddie9-Jun-13 11:44 
Questionstackhash _2f16 Pin
champagne_charly8-Jun-13 9:11
champagne_charly8-Jun-13 9:11 
AnswerRe: stackhash _2f16 Pin
Eddy Vluggen9-Jun-13 5:13
professionalEddy Vluggen9-Jun-13 5:13 
GeneralRe: stackhash _2f16 Pin
champagne_charly9-Jun-13 5:54
champagne_charly9-Jun-13 5:54 
GeneralRe: stackhash _2f16 Pin
Eddy Vluggen9-Jun-13 6:04
professionalEddy Vluggen9-Jun-13 6:04 
GeneralRe: stackhash _2f16 Pin
champagne_charly9-Jun-13 6:06
champagne_charly9-Jun-13 6:06 
GeneralRe: stackhash _2f16 Pin
Eddy Vluggen9-Jun-13 6:19
professionalEddy Vluggen9-Jun-13 6:19 
GeneralRe: stackhash _2f16 Pin
champagne_charly9-Jun-13 8:10
champagne_charly9-Jun-13 8:10 
GeneralRe: stackhash _2f16 Pin
Dave Kreskowiak9-Jun-13 12:50
mveDave Kreskowiak9-Jun-13 12:50 
GeneralRe: stackhash _2f16 Pin
champagne_charly9-Jun-13 13:03
champagne_charly9-Jun-13 13:03 
GeneralRe: stackhash _2f16 Pin
Dave Kreskowiak9-Jun-13 14:22
mveDave Kreskowiak9-Jun-13 14:22 
GeneralRe: stackhash _2f16 Pin
Eddy Vluggen10-Jun-13 3:07
professionalEddy Vluggen10-Jun-13 3:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.