473,765 Members | 2,097 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 IPropertyStorag e
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.OleStora ge.ComDefs.Vari ant

PROP.ulKind = PRPSPEC.PRSPEC_ PROPID
PROP.ID = propertyID

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

And here are the platform declarations I'm using:
Sub ReadMultiple( _
<[In]()ByVal cpspec As Integer, _
<[In](), Out(), MarshalAs(Struc t)ByRef rgpspec As PROPSPEC, _
<Out(), MarshalAs(Struc t)ByRef rgpropvar As
Edanmo.OleStora ge.ComDefs.Vari ant)

< StructLayout(La youtKind.Explic it, CharSet:=CharSe t.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(La youtKind.Explic it) _
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 1825

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

Similar topics

5
2628
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 given CHM file is infected it most likely has an embedded EXE file -- mine had one called . The following code works for Excell sheets, XLS, but fails for
3
457
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 issue if large amounts of data are passed through the wrapper Does anyone know what is the peformance penalty of writing streams via a wrapper to the Structured Storage COM object? Does .NET intend to support Structured Storage natively instead of...
4
7315
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 files by any suffix), when Microsoft uses the concept in most, if not all, of their other products. "Just how hard could it be?" he asks, knowing that 'hard' is a relative concept. -- David Groves Thermo Finnigan--AID
2
3930
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 it fails.... C:\work\BillAnalyser\Bin>tlbimp.exe comadmin.dll /delaysign /publickey:C:\work\key\billanalyser.snk /out:Fb.Interop.ComAdmin.dll It fails saying 'TlbImp error: System.Runtime.InteropServices.COMException -
10
5654
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 that can be pasted into a VB.Net project and run. Thanks Dave
1
1377
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 Interop? TIA Gerald
3
9005
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 view them. But I need to do this programatically. Could anyone point me to a place where I can find info on how to achieve this? Sybari has content filter lists that are stored in DOC files and I need to be able to manage them.
2
2660
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 to go there! Thanks, Dan
3
1277
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 extention and not the standard .chm. -- Gregory Gadow
3
5050
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 only succeeds for one event at a time. Examples: // works by itself OCXClass.Event1 += new OCXClass.EventHandler(Event1_Sub); // second call fails
0
9398
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10156
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9951
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8831
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7375
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5275
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.