Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 113152

Summary: [OLE] converts VT_BSTR (null) to VT_EMPTY, can't create a VT_NULL
Product: [Eclipse Project] Platform Reporter: Dake Gu <folklayer>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact: Felipe Heidrich <eclipse.felipe>
Severity: normal    
Priority: P3 CC: Alexander.Mitin, Konstantin.Scheglov, snorthov
Version: 3.0.1Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Windows All   
Whiteboard: stalebug

Description Dake Gu CLA 2005-10-19 16:02:01 EDT
org.eclipse.swt.ole.win32.Variant

1. A VT_BSTR with NULL value is converted to VT_EMPTY.
Is there any reason to do that?

2. There is no constructor to create a VT_NULL
Comment 1 Felipe Heidrich CLA 2009-08-13 09:54:33 EDT
Your bug has been moved to triage, visit http://www.eclipse.org/swt/triage.php for more info.
Comment 2 Alexander Mitin CLA 2012-03-18 06:39:22 EDT
According to COM rules, a VT_BSTR with null data should be treated as an empty string.
So doing conversion to VT_EMPTY in such case is definitely a bug.
See http://blogs.msdn.com/b/ericlippert/archive/2003/09/12/52976.aspx

The fix is straightforward, just do stringData = "" instead of changing the type in Variant.setData().
Comment 3 Leo Ufimtsev CLA 2017-08-03 12:28:36 EDT
This is a one-off bulk update. (The last one in the triage migration).

Moving bugs from swt-triaged@eclipse to platform-swt-inbox@eclipse.org and adding "triaged" keyword as per new triage process:
https://wiki.eclipse.org/SWT/Devel/Triage

See Bug 518478 for details.

Tag for notification/mail filters:
@TriageBulkUpdate
Comment 4 Eclipse Genie CLA 2020-02-28 02:54:06 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.