Click here to Skip to main content
15,916,846 members
Home / Discussions / C#
   

C#

 
GeneralRe: DragDrop registration failed - Error Pin
Tristan Rhodes1-Apr-04 9:34
Tristan Rhodes1-Apr-04 9:34 
GeneralData Mining for intrusion Detection Pin
srilakshmib1-Apr-04 6:46
srilakshmib1-Apr-04 6:46 
GeneralRe: Data Mining for intrusion Detection Pin
Daniel Turini1-Apr-04 20:42
Daniel Turini1-Apr-04 20:42 
GeneralRe: Data Mining for intrusion Detection Pin
aslan200425-Dec-11 18:04
aslan200425-Dec-11 18:04 
Generalpost form fields to a page programmatically Pin
1-Apr-04 5:56
suss1-Apr-04 5:56 
GeneralRe: post form fields to a page programmatically Pin
Heath Stewart1-Apr-04 6:06
protectorHeath Stewart1-Apr-04 6:06 
GeneralRe: post form fields to a page programmatically Pin
partyganger1-Apr-04 9:50
partyganger1-Apr-04 9:50 
QuestionOCX Control .NET Heath Can you help? Pin
sbeausol1-Apr-04 5:32
sbeausol1-Apr-04 5:32 
I am having a problem with using an ocx control in .NET. It works fine in VB 6.0 etc, but I was hoping to use the robust features .NET has over 6.0. My orginal post is here :

http://www.codeproject.com/script/comments/forums.asp?msg=781067&forumid=1646#xx781067xx

The problem breaks down to this - the ocx control is essentially a class with many get methods that access a binary file. Any method which returns a string fail with type mismatch. Here is an example function description in the docs I have:

{EXAMPLE}
GetCreatorID

long GetCreatorID(BSTR FAR* pbstrCreatorID);

Return Value

1 if successful; otherwise, see Error Codes.

Parameters

pbstrCreatorID A valid pointer to a BSTR. This variable must exist and be initialized to NULL.

Remarks

Returns the creator ID. The creator ID is the logon name of the user when the raw file was acquired.

Example

// example for GetCreatorID
BSTR bstrCreatorID = NULL;
long nRet = XRawfileCtrl.GetCreatorID ( &bstrCreatorID );
{END}

I am calling the function in VB .NET like this:

Dim Creator as String
XRawfileCtrl.GetCreatorID(Creator)
This results in a type mismatch

Dim Creator as New StringBuilder()
XRawfileCtrl.GetCreatorID(Creator)
This gives me the error:
Value of type 'System.Text.StringBuilder' cannot be converted to 'String'.

Any method which returns a date, double or int works fine....

any thoughts?
AnswerRe: OCX Control .NET Heath Can you help? Pin
Heath Stewart1-Apr-04 5:53
protectorHeath Stewart1-Apr-04 5:53 
GeneralRe: OCX Control .NET Heath Can you help? Pin
Dave Kreskowiak1-Apr-04 6:00
mveDave Kreskowiak1-Apr-04 6:00 
GeneralRe: OCX Control .NET Heath Can you help? Pin
Heath Stewart1-Apr-04 6:07
protectorHeath Stewart1-Apr-04 6:07 
GeneralRe: OCX Control .NET Heath Can you help? Pin
sbeausol1-Apr-04 8:28
sbeausol1-Apr-04 8:28 
GeneralRe: OCX Control .NET Heath Can you help? Pin
Nick Parker1-Apr-04 10:15
protectorNick Parker1-Apr-04 10:15 
GeneralRe: OCX Control .NET Heath Can you help? Pin
sbeausol1-Apr-04 10:23
sbeausol1-Apr-04 10:23 
GeneralRe: OCX Control .NET Heath Can you help? Pin
Heath Stewart2-Apr-04 8:51
protectorHeath Stewart2-Apr-04 8:51 
GeneralRe: OCX Control .NET Heath Can you help? Pin
sbeausol2-Apr-04 10:32
sbeausol2-Apr-04 10:32 
GeneralRe: OCX Control .NET Heath Can you help? Pin
sbeausol2-Apr-04 10:46
sbeausol2-Apr-04 10:46 
GeneralRe: OCX Control .NET Heath Can you help? Pin
Heath Stewart2-Apr-04 10:48
protectorHeath Stewart2-Apr-04 10:48 
GeneralRe: OCX Control .NET Heath Can you help? Pin
sbeausol2-Apr-04 10:56
sbeausol2-Apr-04 10:56 
GeneralRe: OCX Control .NET Heath Can you help? Pin
Heath Stewart2-Apr-04 11:00
protectorHeath Stewart2-Apr-04 11:00 
GeneralStill fails in C# Pin
sbeausol2-Apr-04 11:18
sbeausol2-Apr-04 11:18 
GeneralRe: Still fails in C# Pin
Heath Stewart3-Apr-04 3:14
protectorHeath Stewart3-Apr-04 3:14 
GeneralRe: Still fails in C# Pin
sbeausol3-Apr-04 6:17
sbeausol3-Apr-04 6:17 
GeneralRe: save datagrid Pin
Heath Stewart1-Apr-04 5:11
protectorHeath Stewart1-Apr-04 5:11 
GeneralRe: save datagrid Pin
bertcox1-Apr-04 5:35
bertcox1-Apr-04 5:35 

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.