I'm working with IMAPI-v2 and having a problem with setting a property as an
array.
http://msdn2.microsoft.com/en-us/library/aa366454.aspx

It's a Windows API for burning CD's and DVD's. Ships with Vista and is a KB
(KB932716) download for XP.

Does anyone have any ideas on how to set this property with VFP?

Thanks,
Tracy



<code>

LOCAL ;  
     oDiscMaster2 as IMAPI2.MsftDiscMaster2 ;  
   , oDiscRecorder2 as IMAPI2.MsftDiscRecorder2 ;  
   , oFileSystemImage as IMAPI2FS.MsftFileSystemImage ;   
   , oDiscFormat2Data as IMAPI2.MsftDiscFormat2Data ;  
   , aMultiSessionInterfaces[1]  
  
oDiscMaster2 = CREATEOBJECT("IMAPI2.MsftDiscMaster2")   
oDiscRecorder2 = CreateObject("IMAPI2.MsftDiscRecorder2")   
oFileSystemImage = CREATEOBJECT("IMAPI2FS.MsftFileSystemImage")   
oDiscFormat2Data = CREATEOBJECT("IMAPI2.MsftDiscFormat2Data")   
oDiscRecorder2.InitializeDiscRecorder(oDiscMaster2.Item(0))   
oDiscFormat2Data.Recorder = oDiscRecorder2  
oFileSystemImage.FreeMediaBlocks = oDiscFormat2Data.FreeSectorsOnMedia   
IF oDiscFormat2Data.NextWritableAddress > 0   
*-- Attempt to copy the safearray directly to the file system object   
*-- causes Property MULTISESSIONINTERFACES is not found.   
*!*      oFileSystemImage.MultisessionInterfaces =
oDiscFormat2Data.MultisessionInterfaces   
   
*-- Attempt to get the safearray into a VFP array then use it causes   
*-- OLE error code 0x80020005: Type mismatch.   
*!*      aMultiSessionInterfaces = oDiscFormat2Data.MultisessionInterfaces

*!*      STORE aMultisessionInterfaces TO
oFileSystemImage.MultisessionInterfaces   
*-- OR this way   
*!*      oFileSystemImage.MultisessionInterfaces = aMultisessionInterfaces

   
*-- Attempt to use the STORE fails with
*-- Data type mismatch.
   STORE oDiscFormat2Data.MultisessionInterfaces TO
oFileSystemImage.MultisessionInterfaces   
ENDIF  





_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to