Results 1 to 5 of 5

Thread: [UPDATE] API - Is my logic flawed?

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2002
    Posts
    38

    [UPDATE] API - Is my logic flawed?

    the original thread started here but i guess it's better suited for this forum.

    i'm trying to read mail from a Microsoft Exchange server. the HTML portion is stored in a field in a compressed format. MS provides a function to uncompress the RTF here but it's in C++ which i'm pretty much clueless about. MerrionComputin gave me this API call which i've added:
    Code:
    Public Declare Function WrapCompressedRTFStream Lib "mapi32.dll" (ByVal lpCompressedRTFStream As Long , _ 
                              ByVal uFlags As Long , _ 
                              lpUncompressedStream As Long ) As Long
    i though i could pretty much do something like this:
    Code:
    CONST S_OK = &H0
    myRTF = myMessage.Fields(CdoPR_RTF_COMPRESSED) ' get the compressed portion - this works fine
    myRTF_U = Space(50000)
    If WrapCompressedRTFStream(StrPtr(myRTF), 0, StrPtr(myRTF_U)) <> S_OK Then
    MsgBox("Error")
    End If
    the function returns S_OK but the value of RTF_U is just 50000 spaces. is my logic flawed here?

    thanks!
    Last edited by ChrisHaas; May 20th, 2002 at 12:20 PM.
    Chris Haas
    Web Developer
    Ovation Advertising & Marketing
    p. (608) 785-2460
    e. [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width