Click here to Skip to main content
16,007,814 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow can i use MS forms2 Combobox in VB 2005 Pin
Kashif Haqqani18-Jul-07 0:08
Kashif Haqqani18-Jul-07 0:08 
AnswerRe: How can i use MS forms2 Combobox in VB 2005 Pin
Naji El Kotob18-Jul-07 0:36
Naji El Kotob18-Jul-07 0:36 
GeneralRe: How can i use MS forms2 Combobox in VB 2005 Pin
Kashif Haqqani20-Jul-07 0:48
Kashif Haqqani20-Jul-07 0:48 
QuestionHow to pass multiple value to next using session Pin
hsuresh18-Jul-07 0:00
hsuresh18-Jul-07 0:00 
AnswerRe: How to pass multiple value to next using session Pin
Jayesh Talsaniya18-Jul-07 2:11
Jayesh Talsaniya18-Jul-07 2:11 
QuestionRE: I could use some help here Pin
dienadel17-Jul-07 23:02
dienadel17-Jul-07 23:02 
AnswerRe: RE: I could use some help here Pin
Colin Angus Mackay17-Jul-07 23:16
Colin Angus Mackay17-Jul-07 23:16 
AnswerRe: RE: I could use some help here Pin
Nilesh Hapse18-Jul-07 1:05
Nilesh Hapse18-Jul-07 1:05 
GeneralRe: RE: I could use some help here Pin
Nilesh Hapse18-Jul-07 1:09
Nilesh Hapse18-Jul-07 1:09 
AnswerRe: RE: I could use some help here Pin
Naji El Kotob18-Jul-07 2:33
Naji El Kotob18-Jul-07 2:33 
GeneralRe: RE: I could use some help here Pin
Colin Angus Mackay18-Jul-07 2:43
Colin Angus Mackay18-Jul-07 2:43 
GeneralRe: RE: I could use some help here Pin
dienadel18-Jul-07 15:50
dienadel18-Jul-07 15:50 
AnswerThe rules Pin
leckey18-Jul-07 2:55
leckey18-Jul-07 2:55 
GeneralRe: The rules Pin
Paul Conrad18-Jul-07 6:11
professionalPaul Conrad18-Jul-07 6:11 
AnswerRe: RE: I could use some help here Pin
manni_n18-Jul-07 8:07
manni_n18-Jul-07 8:07 
QuestionHi,Correctly uncompressing RTF text Pin
MartyK200717-Jul-07 22:48
MartyK200717-Jul-07 22:48 
AnswerRe: Hi,Correctly uncompressing RTF text Pin
Dave Kreskowiak18-Jul-07 4:31
mveDave Kreskowiak18-Jul-07 4:31 
You've got several problems. The lack of anyone using this API with C# or VB.NET is one of them, so documentation and support is lacking.

First, I think your declaration has to look more like:
Private Declare Auto Function WrapCompressedRTFStream Lib "mapi32.dll" ( _
    <MarshalAs(UnmanagedType.Interface)> ByVal lpCompressedRTFStream As ComTypes.IStream, _
    ByVal ulFlags As UInt32, _
    <MarshalAs(UnmanagedType.Interface)> ByVal lpUncompressedRTFStream As ComTypes.IStream) _
        As Integer

I have no way of testing this!

Second. You create an lpSource stream, but you never associate that stream with the incomming data. It's a stream that points to nothing. Some thing with your lpTarget. It also points to God knows what. You haven't told either of these object where the source and destination streams are actually supposed to get/write their data.
'  OK...You've created a couple of Streams.  What are they looking at??  Nothing!
Dim lpsource As ADODB.Stream = New ADODB.Stream ' Microsoft ADODB Com object reference
Dim lptarget As ADODB.Stream = New ADODB.Stream
...
Try
' Great! You set the stream types, but you still haven't told the source stream
' where to get it's data from!
lpsource.Type = StreamTypeEnum.adTypeText
lptarget.Type = StreamTypeEnum.adTypeText
 
' Open what stream??
lpsource.Open()

' I have no idea what this line is doing, nor why it's even here.
lpsource.WriteText(objMail.Fields(CdoPR_RTF_COMPRESSED).Value)

WrapCompressedRTFStream(lpsource, STORE_UNCOMPRESSED_RTF, lptarget)
' OK.  Now you've got the source stream wrapped.  But you don't read anything and
' you don't write anything to any stream.  All you did was wrap the source for
' decompression!
??????

From what I've seen in the docs for WrapCompressed... the stream you should be reading to get the uncompressed RTF is the lptarget stream.

I can't tell you exactly how to fix these problems. I have nothing to test any code with that will supply a compressed RTF in an email.


A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


GeneralRe: Hi,Correctly uncompressing RTF text Pin
MartyK200718-Jul-07 4:48
MartyK200718-Jul-07 4:48 
QuestionForm Capture Pin
Ahmad Zaidi17-Jul-07 22:21
Ahmad Zaidi17-Jul-07 22:21 
AnswerRe: Form Capture Pin
The ANZAC18-Jul-07 1:46
The ANZAC18-Jul-07 1:46 
GeneralRe: Form Capture Pin
Ahmad Zaidi19-Jul-07 0:27
Ahmad Zaidi19-Jul-07 0:27 
Questionvb.net exe Pin
Jayesh Talsaniya17-Jul-07 22:09
Jayesh Talsaniya17-Jul-07 22:09 
AnswerRe: vb.net exe Pin
Steven J Jowett18-Jul-07 1:22
Steven J Jowett18-Jul-07 1:22 
GeneralRe: vb.net exe Pin
Jayesh Talsaniya18-Jul-07 2:08
Jayesh Talsaniya18-Jul-07 2:08 
Questioncrystal with vb.net package Pin
Jayesh Talsaniya17-Jul-07 21:55
Jayesh Talsaniya17-Jul-07 21:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.