Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6909683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:43:12+00:00 2026-05-27T08:43:12+00:00

I am doing an application that comunicates vb6 with a cryptographic wrapper. The .net

  • 0

I am doing an application that comunicates vb6 with a cryptographic wrapper. The .net and interop part, up to now, is alright, fully working.
As my client is testing It, I just have a quick question:

[ComVisible(true)]
public SomeObjectComVisible GetThat(byte[] array){ ... }

I used, until now, either types that I exposed to com or int and string, and no problems until now.

Is it ok to use (.net) byte or chould I use *char?
When I mark the assembly to be visible and register to com interop, it creates a wrapper for it, or should I use some unmanaged type?

Ah, it is a vb6, not vbscript.

thanks a million

for those who seek the answer:

public SomeObjectComVisible GetThat([MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_UI1)]byte[] array)

the problem is with arrays.
http://msdn.microsoft.com/en-us/library/z6cfh6e6.aspx
and
http://msdn.microsoft.com/en-us/library/75dwhxf7.aspx

Any non bittable type can be a chore. You can specify your own types so they are used, you just have to make use of

[ComVisible(true), 
ClassInterface(ClassInterfaceType.None),
ProgId("SomeNamespace.SomeClass"),
Guid("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")]

on top of the class

Thank you very much you all.

Great help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:43:13+00:00Added an answer on May 27, 2026 at 8:43 am

    Marshaling of arrays is something I struggle with often when dealing with COM clients of my .Net code. This article I find very useful in helping me understand the process.

    Blittable and Non-Blittable Types

    Specifically you can look at this article which talks about arrays

    Note: part of my original answer which we found to be incorrect

    So from looking at that it looks like “byte” isn’t blitable yet
    “Byte” is. If you switch to Byte[] it will likely work the way
    you expect it to. Note: char isn’t blitable but Char is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a mini-project which consists of doing a client-server chat application.
People always advised me that if I am doing some application that should use
I have a winforms application that is doing the following: on each query: Db
I am creating a simple application with Django. I realized that I am doing
I am doing a delphi application that will run on my pc 24/7 in
In the application that we have, we're doing some AJAX response. Once in a
I have a WPF application which so far has been client only, but now
I'm working on a Silverlight 3 application that has to communicate with a PHP
im doing an application in which im transfering file through FTP.i succesfully done all
I'm am curently doing an application with Google Maps, where I am checking the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.