Click here to Skip to main content
15,891,033 members
Home / Discussions / C#
   

C#

 
GeneralRe: Calling C++ Image API from C# Pin
econner13-Jan-11 13:38
econner13-Jan-11 13:38 
GeneralRe: Calling C++ Image API from C# Pin
_Erik_14-Jan-11 1:51
_Erik_14-Jan-11 1:51 
GeneralRe: Calling C++ Image API from C# Pin
econner14-Jan-11 9:12
econner14-Jan-11 9:12 
GeneralRe: Calling C++ Image API from C# Pin
_Erik_14-Jan-11 10:22
_Erik_14-Jan-11 10:22 
GeneralRe: Calling C++ Image API from C# Pin
econner14-Jan-11 11:38
econner14-Jan-11 11:38 
GeneralRe: Calling C++ Image API from C# Pin
econner14-Jan-11 12:07
econner14-Jan-11 12:07 
GeneralRe: Calling C++ Image API from C# Pin
econner14-Jan-11 12:30
econner14-Jan-11 12:30 
GeneralRe: Calling C++ Image API from C# Pin
econner15-Jan-11 5:16
econner15-Jan-11 5:16 
Erik,

I wanted to thank you again for the assistance.

I was able to confirm that the code require the buffer and pinning/marshaling of the memory and it will not work correctly without the suggestions you provided.

I also wanted to let you know what compounded the testing issue with the error was due to incomplete documentation. After getting the process to work, I was able to change certain settings and was able to cause the process to fail. Basically, the image class has to define the height and width to the MAXIMUM allowed image that the scanner can accept. Then the buffer size is set to the max height * max width * single/double scanner mode. Once the scanner returns the image, it adjusts the height and buffer values to be what are read in from the scanner. If the image sizes are specified incorrectly/too small, the API will cause a memory error. For example, the image of the scanned area may be 4" but the scanner's read head is capable of scanning a wider area. So the image width has to be pre-set the maximum width of the read head and not the width of the item that is being scanned. BTW, these maximum values are not specified in the documentation or samples. I actually had to dig thru a C++ sample application and the header files to find these settings.

Thanks again.
GeneralRe: Calling C++ Image API from C# Pin
_Erik_17-Jan-11 2:32
_Erik_17-Jan-11 2:32 
AnswerRe: Calling C++ Image API from C# Pin
Luc Pattyn13-Jan-11 5:18
sitebuilderLuc Pattyn13-Jan-11 5:18 
AnswerRe: Calling C++ Image API from C# [modified] Pin
econner13-Jan-11 6:11
econner13-Jan-11 6:11 
AnswerRe: Calling C++ Image API from C# Pin
Luc Pattyn13-Jan-11 6:22
sitebuilderLuc Pattyn13-Jan-11 6:22 
GeneralRe: Calling C++ Image API from C# Pin
econner13-Jan-11 6:49
econner13-Jan-11 6:49 
AnswerRe: Calling C++ Image API from C# Pin
Luc Pattyn13-Jan-11 6:56
sitebuilderLuc Pattyn13-Jan-11 6:56 
GeneralRe: Calling C++ Image API from C# Pin
econner13-Jan-11 7:00
econner13-Jan-11 7:00 
AnswerRe: Calling C++ Image API from C# Pin
jschell13-Jan-11 8:06
jschell13-Jan-11 8:06 
QuestionHow to record audio and modify the signal? Pin
softwarejaeger13-Jan-11 3:41
softwarejaeger13-Jan-11 3:41 
AnswerRe: How to record audio and modify the signal? Pin
Rob Philpott13-Jan-11 4:17
Rob Philpott13-Jan-11 4:17 
AnswerRe: How to record audio and modify the signal? Pin
Luc Pattyn13-Jan-11 4:28
sitebuilderLuc Pattyn13-Jan-11 4:28 
AnswerRe: How to record audio and modify the signal? Pin
_Erik_13-Jan-11 4:35
_Erik_13-Jan-11 4:35 
AnswerRe: How to record audio and modify the signal? Pin
Dalek Dave13-Jan-11 4:39
professionalDalek Dave13-Jan-11 4:39 
GeneralRe: How to record audio and modify the signal? Pin
softwarejaeger13-Jan-11 20:16
softwarejaeger13-Jan-11 20:16 
AnswerRe: How to record audio and modify the signal? Pin
César de Souza13-Jan-11 11:16
professionalCésar de Souza13-Jan-11 11:16 
QuestionHow i can make my connection string dynmic with th current root ? Pin
Honeyboy_2013-Jan-11 2:32
Honeyboy_2013-Jan-11 2:32 
AnswerRe: How i can make my connection string dynmic with th current root ? Pin
RaviRanjanKr13-Jan-11 4:20
professionalRaviRanjanKr13-Jan-11 4:20 

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.