Click here to Skip to main content
15,922,584 members
Home / Discussions / C#
   

C#

 
GeneralRe: what does it do? Pin
zhoujun18-May-02 16:30
zhoujun18-May-02 16:30 
QuestionHow to run c# app on a win2000 machine without installing the framework? Pin
16-May-02 20:18
suss16-May-02 20:18 
AnswerRe: How to run c# app on a win2000 machine without installing the framework? Pin
Rickard Andersson2016-May-02 20:31
Rickard Andersson2016-May-02 20:31 
AnswerRe: How to run c# app on a win2000 machine without installing the framework? Pin
Michael P Butler16-May-02 22:27
Michael P Butler16-May-02 22:27 
AnswerRe: How to run c# app on a win2000 machine without installing the framework? Pin
James T. Johnson17-May-02 1:00
James T. Johnson17-May-02 1:00 
GeneralVariants in .net Pin
ElCortez16-May-02 13:21
ElCortez16-May-02 13:21 
GeneralRe: Variants in .net Pin
Rama Krishna Vavilala16-May-02 14:35
Rama Krishna Vavilala16-May-02 14:35 
GeneralRe: Variants in .net Pin
ElCortez16-May-02 20:51
ElCortez16-May-02 20:51 
Hi' and thanks for your reply.

Yes i did import the control with the AxImp tool.
The code that is giving me trouble is the following:

object bmp = new System.Object();
object size = new System.Object();

ax.GetBMP(ref bmp, ref size);

** pictureBox1.Image = (Bitmap)bmp;

** The exception gets thrown on this line, and sounds like this:
an unhandled exception of type System.InvalidCastException occured in WindowsApplication2.exe
Additional information: Specified cast is not valid.

The "blueprint" for the method looks like this:
ax.GetBmp(ref object vimage, ref object vsize)

And in the documentation for the ActiveX Control the two parameters of the GetBMP method is listed af Variant types.
Holding that together with this table from the framework SDK i guess the variant type is not completely supported:
TypeCode COM variant type
----------------------------------------
TypeCode.Empty --> VT_EMPTY
TypeCode.Object --> VT_UNKNOWN
TypeCode.DBNull --> VT_NULL
TypeCode.Boolean --> VT_BOOL
TypeCode.Char --> VT_UI2
TypeCode.Sbyte --> VT_I1
TypeCode.Byte --> VT_UI1
TypeCode.Int16 --> VT_I2
TypeCode.UInt16 --> VT_UI2
TypeCode.Int32 --> VT_I4
TypeCode.UInt32 --> VT_UI4
TypeCode.Int64 --> VT_I8
TypeCode.UInt64 --> VT_UI8
TypeCode.Single --> VT_R4
TypeCode.Double --> VT_R8
TypeCode.Decimal --> VT_DECIMAL
TypeCode.DateTime --> VT_DATE
TypeCode.String --> VT_BSTR
Not supported. --> VT_INT
Not supported. --> VT_UINT
Not supported. --> VT_ARRAY
Not supported. --> VT_RECORD
Not supported. --> VT_CY
Not supported. --> VT_VARIANT

Or am i just confused..

I hope to get some input back

Venlig hilsen / Regards

Steffen Otto Jensen
(Denmark)
GeneralRe: Variants in .net Pin
Gaul21-May-02 4:34
Gaul21-May-02 4:34 
GeneralRe: Variants in .net Pin
ElCortez21-May-02 12:11
ElCortez21-May-02 12:11 
GeneralRe: Variants in .net Pin
Rama Krishna Vavilala21-May-02 12:30
Rama Krishna Vavilala21-May-02 12:30 
GeneralRe: Variants in .net Pin
ElCortez21-May-02 13:05
ElCortez21-May-02 13:05 
GeneralRe: Variants in .net Pin
Rama Krishna Vavilala21-May-02 14:46
Rama Krishna Vavilala21-May-02 14:46 
GeneralRe: Variants in .net Pin
ElCortez22-May-02 2:15
ElCortez22-May-02 2:15 
GeneralString handling book excerpt Pin
Tom Archer16-May-02 5:37
Tom Archer16-May-02 5:37 
GeneralRe: String handling book excerpt Pin
Rickard Andersson2016-May-02 7:15
Rickard Andersson2016-May-02 7:15 
GeneralRe: String handling book excerpt Pin
Albert Pascual16-May-02 7:19
sitebuilderAlbert Pascual16-May-02 7:19 
GeneralRe: String handling book excerpt Pin
Tom Archer16-May-02 7:16
Tom Archer16-May-02 7:16 
GeneralRe: String handling book excerpt Pin
Albert Pascual16-May-02 7:30
sitebuilderAlbert Pascual16-May-02 7:30 
GeneralRe: String handling book excerpt Pin
Tom Archer16-May-02 7:30
Tom Archer16-May-02 7:30 
GeneralRe: String handling book excerpt Pin
Albert Pascual16-May-02 7:43
sitebuilderAlbert Pascual16-May-02 7:43 
GeneralRe: String handling book excerpt Pin
Tom Archer16-May-02 7:38
Tom Archer16-May-02 7:38 
GeneralRe: String handling book excerpt Pin
Joao Vaz16-May-02 9:28
Joao Vaz16-May-02 9:28 
GeneralRe: String handling book excerpt Pin
Tom Archer16-May-02 10:45
Tom Archer16-May-02 10:45 
GeneralRe: String handling book excerpt Pin
Joao Vaz16-May-02 11:11
Joao Vaz16-May-02 11:11 

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.