473,387 Members | 1,603 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

ReadMultiple OLE Structured Storage interop fails under 64-bit

I'm trying to port Edanmo's OLE Storage class
(http://www.mvps.org/emorcillo/en/code/grl/storage.shtml) to x64. After my
modifications, it still works fine under x86. However, I'm getting a
mysterious error when I try to call ReadMultiple on my IPropertyStorage
object under x64: "No mapping for the Unicode character exists in the target
multi-byte code page. (Exception from HRESULT: 0x80070459)".

Here's the calling code:
Dim PROP As PROPSPEC
Dim value As Edanmo.OleStorage.ComDefs.Variant

PROP.ulKind = PRPSPEC.PRSPEC_PROPID
PROP.ID = propertyID

' Get the property
m_IPropStgObj.ReadMultiple(1, PROP, value)

And here are the platform declarations I'm using:
Sub ReadMultiple( _
<[In]()ByVal cpspec As Integer, _
<[In](), Out(), MarshalAs(Struct)ByRef rgpspec As PROPSPEC, _
<Out(), MarshalAs(Struct)ByRef rgpropvar As
Edanmo.OleStorage.ComDefs.Variant)

< StructLayout(LayoutKind.Explicit, CharSet:=CharSet.Unicode) _
Friend Structure PROPSPEC
<FieldOffset(0)Public ulKind As PRPSPEC
<FieldOffset(4)Public ID As Integer
<FieldOffset(4)Public Name As IntPtr
End Structure

Friend Enum PRPSPEC As Integer
PRSPEC_LPWSTR = 0
PRSPEC_PROPID = 1
PRSPEC_INVALID = &HFFFFFFFF
End Enum

< StructLayout(LayoutKind.Explicit) _
Friend Structure [Variant]
<FieldOffset(0)Dim vt As Short
<FieldOffset(8)Dim Ptr As IntPtr
<FieldOffset(8)Dim [Byte] As Byte
<FieldOffset(8)Dim [Long] As Long
'...(support functions for this struct omitted)
End Structure
I've tested and double-checked against Microsoft's docs every which way I
can think of without any luck. As I said, it works fine under x86 and as
far as I can tell it should work under x64 too. If someone has a solution
or any thoughts, please post them.

Thanks,

John

Apr 23 '07 #1
0 1799

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: tlviewer | last post by:
hello, In honor of the chm exploit that I got hit by last week, I trying to code some ActivePython to list the directory inside a CHM. CHM is supposed to be structured storage (ITSF). If a...
3
by: Edmond Neo | last post by:
I use structured storage to store large amounts of data in various streams. I realize that I can call structured storage through a wrapper in .NET, but I'm concerned that there is a performance...
4
by: David Groves | last post by:
Are there any plans to incorporate a native C# facility to deal with the OLE Structured Storage concept? It's clumsy at best to have to construct a C++ interface to the .doc files (or any such...
2
by: Ollie | last post by:
I am trying to generate a strong name assembly from the unmanaged DLL for the COM + 1.0 Admin Type Library located in the C:\WINDOWS\system32\Com\comadmin.dll, but when I run the following command...
10
by: Dave | last post by:
Has anyone out there managed to create a structured storage file using pure VB.Net? Specifically; with the API function StgCreateStorageEx? If so, could you post a working example here please. One...
1
by: Gerald Hernandez | last post by:
The .NET Framework is huge, and either this isn't in there, or I'm just missing it... Are there any built-in methods to work with OLE2 Structured Storage files? Or am I stuck with using COM...
3
by: Dwight | last post by:
I need to be able to read and create Structured Storage Files. I have not been able to find anything about this except for C++, which I do not know. currently i'm using a DOC viewer (eDoc) just to...
2
by: ERE | last post by:
I'd like to encapsulate several files -- mostly graphics files -- as a single file. Does .NET provide a convenient way to do this? COM provided structured storage -- but I definitely don't want...
3
by: Gregory Gadow | last post by:
Is there a way to create structured files in .NET 2.0? Essentially, I want to take a hierarchic web site and convert it to a single, navigatable file similar to the compiled help, but using my own...
3
by: Stryker.Ninja | last post by:
First time poster, please be gentle :P I am using a third party ocx control in a C# 2.0 application. The interop seems to be working fine except for events. When I try and attach an event, it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.