[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] vb.net and activex dll



Marcel Ruff wrote:
Dupuy, Robert wrote:

I don't program in vb.net normally, but I had similar experiences with
the activex bridge
As the original poster in this thread.

As a reminder, the original poster said:

private sub xmlScriptAccess_update(byval msg as object) handles
xmlBlaster.XmlScriptAccessSource_Event_update
dim qos as object dim contentStr as string
dim byteContents() as Byte = new Byte(1024) {} ' byte array of
1 try
2 qos = msg.getQos() ' OK
3 len = msg.getContent().length ' OK returns 344 4 byteContents= msg.getContent() ' EXCEPTION
5 contentStr = msg.getContentStr() ' EXCEPTION
6 xmlBlaster.setUpdateReturn("<qos><state> id='OK' /></qos>")


First msg.getContent() is returning Sbyte(), so that is one issue you
are having.
As for why msg.getContentStr() doesn't work, I also have a situation
where strings just won't be returnd by msg.getContentStr(),
msg.getContentBase64(),
msg.getQos().getClientProperty("myAge").getStringValue(), all of these
things are being typed as _ComObject, not as strings.

Here the debugger tells me:

  msg  is a           System.__ComObject
  msg.getQos() is a   System.__ComObject
  msg.getQos().getClientProperty("myAge", "-99")   is a String
  msg.getQos().getClientProperty("myAge").getStringValue()  is a String

Microsoft .Net Framework 1.1.4322 on
Windows XP Professional Service Pack 1

java.runtime.version 1.5.0-beta-b32c
os.version 5.1
sun.io.unicode.encoding UnicodeLittle
file.encoding Cp1252

And part of my .vbproj:

<References>
<Reference
Name = "System"
AssemblyName = "System"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
/>
<Reference
Name = "XmlScriptAccess"
Guid = "{D824B186-AE3C-11D6-ABF5-00B0D07B8581}"
VersionMajor = "1"
VersionMinor = "0"
Lcid = "0"
WrapperTool = "tlbimp"
/>
<Reference
Name = "System.Windows.Forms"
AssemblyName = "System.Windows.Forms"
HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Windows.Forms.dll"
/>
</References>



It runs fine here, i've still no clue why it fails on your platform ...

regards
Marcel

--
http://www.xmlBlaster.org