Click here to Skip to main content
15,891,184 members
Home / Discussions / C#
   

C#

 
QuestionIP:Port online checker Pin
kotor2114-Aug-07 2:38
kotor2114-Aug-07 2:38 
AnswerRe: IP:Port online checker Pin
Judah Gabriel Himango14-Aug-07 6:31
sponsorJudah Gabriel Himango14-Aug-07 6:31 
QuestionBest way to implement a wrapper class with files Pin
Christopher Stratmann14-Aug-07 2:29
Christopher Stratmann14-Aug-07 2:29 
AnswerRe: Best way to implement a wrapper class with files Pin
Colin Angus Mackay14-Aug-07 2:56
Colin Angus Mackay14-Aug-07 2:56 
GeneralRe: Best way to implement a wrapper class with files Pin
Christopher Stratmann14-Aug-07 3:23
Christopher Stratmann14-Aug-07 3:23 
QuestionSTA model and new thread Pin
myshketer14-Aug-07 1:38
myshketer14-Aug-07 1:38 
AnswerRe: STA model and new thread Pin
Judah Gabriel Himango14-Aug-07 4:12
sponsorJudah Gabriel Himango14-Aug-07 4:12 
QuestionIPropertyStorage.ReadMultiple problem Pin
C_Man14-Aug-07 1:31
C_Man14-Aug-07 1:31 
I get the following error when calling the ReadMultiple method.
The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

I don't suppose anyone has a working example of reading the summary information from a file? The annoying thing is that I can write to the summary fields but not read themMad | :mad:

<br />
        [StructLayout(LayoutKind.Explicit, Size = 8, CharSet = CharSet.Unicode)]<br />
        public struct PropSpec<br />
        {<br />
            [FieldOffset(0)]<br />
            public int ulKind;<br />
            [FieldOffset(4)]<br />
            public IntPtr Name_Or_ID;<br />
        }<br />
<br />
        [StructLayout(LayoutKind.Explicit, Size = 16)]<br />
        public struct PropVariant<br />
        {<br />
            [FieldOffset(0)]<br />
            public short variantType;<br />
            [FieldOffset(8)]<br />
            public IntPtr pointerValue;<br />
            [FieldOffset(8)]<br />
            public byte byteValue;<br />
            [FieldOffset(8)]<br />
            public long longValue;<br />
<br />
            public void FromObject(object obj)<br />
            {<br />
                if (obj.GetType() == typeof(string))<br />
                {<br />
                    this.variantType = (short)VarEnum.VT_LPWSTR;<br />
                    this.pointerValue = Marshal.StringToHGlobalUni((string)obj);<br />
                }<br />
            }<br />
        }<br />
<br />
        [ComVisible(true), ComImport(),<br />
        Guid("00000138-0000-0000-C000-000000000046"),<br />
        InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]<br />
        public interface IPropertyStorage<br />
        {<br />
            uint ReadMultiple(<br />
                uint numProperties,<br />
                PropSpec[] propertySpecifications,<br />
                out PropVariant[] propertyValues);<br />
<br />
            uint WriteMultiple(<br />
                uint numProperties,<br />
                [MarshalAs(UnmanagedType.Struct)] ref PropSpec propertySpecification,<br />
                ref PropVariant propertyValues,<br />
                int propIDNameFirst);<br />
<br />
            uint Commit(<br />
                int commitFlags);<br />
        }<br />
<br />
// Specify the property to be retrieved <br />
PropSpec[] propSpecs = new PropSpec[1];<br />
propSpecs[0].ulKind = 1;<br />
propSpecs[0].Name_Or_ID = new IntPtr((int)summaryType);<br />
PropVariant[] propertyValues = new PropVariant[1];<br />
<br />
// Retrieve the value <br />
hresult = propStorage.ReadMultiple(1, propSpecs, out propertyValues); <br />


Thanks
AnswerRe: IPropertyStorage.ReadMultiple problem Pin
Judah Gabriel Himango14-Aug-07 4:13
sponsorJudah Gabriel Himango14-Aug-07 4:13 
GeneralRe: IPropertyStorage.ReadMultiple problem Pin
C_Man14-Aug-07 5:13
C_Man14-Aug-07 5:13 
Questionconvert html to pdf Pin
omer erakman14-Aug-07 1:23
omer erakman14-Aug-07 1:23 
AnswerRe: convert html to pdf Pin
Hessam Jalali14-Aug-07 2:50
Hessam Jalali14-Aug-07 2:50 
AnswerRe: convert html to pdf Pin
Vasudevan Deepak Kumar14-Aug-07 4:10
Vasudevan Deepak Kumar14-Aug-07 4:10 
GeneralRe: convert html to pdf Pin
omer erakman14-Aug-07 4:20
omer erakman14-Aug-07 4:20 
QuestionProblem with negative number Pin
K. Ahlers14-Aug-07 1:19
K. Ahlers14-Aug-07 1:19 
AnswerRe: Problem with negative number Pin
plastio14-Aug-07 1:37
plastio14-Aug-07 1:37 
GeneralRe: Problem with negative number Pin
K. Ahlers14-Aug-07 1:40
K. Ahlers14-Aug-07 1:40 
AnswerRe: Problem with negative number Pin
Luc Pattyn14-Aug-07 1:42
sitebuilderLuc Pattyn14-Aug-07 1:42 
GeneralRe: Problem with negative number Pin
K. Ahlers14-Aug-07 1:45
K. Ahlers14-Aug-07 1:45 
GeneralRe: Problem with negative number Pin
J4amieC14-Aug-07 3:24
J4amieC14-Aug-07 3:24 
GeneralRe: Problem with negative number Pin
Luc Pattyn14-Aug-07 6:06
sitebuilderLuc Pattyn14-Aug-07 6:06 
GeneralRe: Problem with negative number Pin
K. Ahlers14-Aug-07 10:57
K. Ahlers14-Aug-07 10:57 
GeneralRe: Problem with negative number Pin
Luc Pattyn14-Aug-07 13:31
sitebuilderLuc Pattyn14-Aug-07 13:31 
GeneralRe: Problem with negative number Pin
K. Ahlers14-Aug-07 23:14
K. Ahlers14-Aug-07 23:14 
GeneralRe: Problem with negative number Pin
Luc Pattyn15-Aug-07 2:43
sitebuilderLuc Pattyn15-Aug-07 2:43 

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.