Click here to Skip to main content
15,888,521 members
Home / Discussions / C#
   

C#

 
GeneralRe: reportAppFactory.OpenDocument throws Invalid Cast exception (No such interfaces supported) Pin
Rhys Gravell6-Sep-10 23:43
professionalRhys Gravell6-Sep-10 23:43 
GeneralRe: reportAppFactory.OpenDocument throws Invalid Cast exception (No such interfaces supported) Pin
amitcoder836-Sep-10 23:46
amitcoder836-Sep-10 23:46 
GeneralRe: reportAppFactory.OpenDocument throws Invalid Cast exception (No such interfaces supported) Pin
Rhys Gravell6-Sep-10 23:53
professionalRhys Gravell6-Sep-10 23:53 
GeneralRe: reportAppFactory.OpenDocument throws Invalid Cast exception (No such interfaces supported) [modified] Pin
phil.o7-Sep-10 0:00
professionalphil.o7-Sep-10 0:00 
AnswerRe: reportAppFactory.OpenDocument throws Invalid Cast exception (No such interfaces supported) Pin
Bernhard Hiller7-Sep-10 0:05
Bernhard Hiller7-Sep-10 0:05 
QuestionHow to write C# struct with array to communicate via IP to C struct device Pin
ejp666-Sep-10 16:12
ejp666-Sep-10 16:12 
AnswerRe: How to write C# struct with array to communicate via IP to C struct device Pin
Luc Pattyn6-Sep-10 16:48
sitebuilderLuc Pattyn6-Sep-10 16:48 
AnswerRe: How to write C# struct with array to communicate via IP to C struct device Pin
DaveyM696-Sep-10 22:18
professionalDaveyM696-Sep-10 22:18 
From the information you've supplied, this looks like it should work:
C#
using System.Runtime.InteropServices;

/*
typedef enum packetCmds_enum {
PC_TO_DSP_WRITE = 1,
PC_TO_DSP_READ = 2,
DSP_TO_PC_ACK = 3
}packetCmds_enum;
*/
public enum PacketCmds
{
    PC_TO_DSP_WRITE = 1,
    PC_TO_DSP_READ = 2,
    DSP_TO_PC_ACK = 3
}

/*
typedef struct cmdPacket_type {
packetCmds_enum cmd; //< Should be 32 bits
Uint32 size; //< Set to zero if no data
Uint32 addr; //< Target address
Uint8 data[MAX_PACKET_PAYLOAD];
Uint32 checksum; //< Includes cmd, size, addr and data.
} cmdPacket_type;
*/
[StructLayout(LayoutKind.Sequential)]
public struct CmdPacketType
{
    // #define MAX_PACKET_PAYLOAD 1024
    public const int MAX_PACKET_PAYLOAD = 1024;

    public PacketCmds cmd;
    public uint size;
    public uint addr;
    [MarshalAs(UnmanagedType.ByValArray, ArraySubType=UnmanagedType.U1, SizeConst=MAX_PACKET_PAYLOAD)]
    public byte[] data;
    public uint checksum;
}

Dave

Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.
Astonish us. Be exceptional. (Pete O'Hanlon)

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)



GeneralRe: How to write C# struct with array to communicate via IP to C struct device Pin
Paul Michalik7-Sep-10 9:42
Paul Michalik7-Sep-10 9:42 
Questionsend file with bluetooth from pc to phone without accept Pin
behzadcp6-Sep-10 8:31
professionalbehzadcp6-Sep-10 8:31 
AnswerRe: send file with bluetooth from pc to phone without accept Pin
Smithers-Jones6-Sep-10 8:42
Smithers-Jones6-Sep-10 8:42 
GeneralRe: send file with bluetooth from pc to phone without accept Pin
behzadcp6-Sep-10 9:01
professionalbehzadcp6-Sep-10 9:01 
GeneralRe: send file with bluetooth from pc to phone without accept Pin
DaveyM696-Sep-10 9:05
professionalDaveyM696-Sep-10 9:05 
GeneralRe: send file with bluetooth from pc to phone without accept Pin
Dave Kreskowiak6-Sep-10 17:41
mveDave Kreskowiak6-Sep-10 17:41 
AnswerRe: send file with bluetooth from pc to phone without accept Pin
allen-homen6-Sep-10 20:11
allen-homen6-Sep-10 20:11 
Questiontextbox like IE Pin
zzinbalzz6-Sep-10 6:40
zzinbalzz6-Sep-10 6:40 
AnswerRe: textbox like IE Pin
DaveyM696-Sep-10 8:24
professionalDaveyM696-Sep-10 8:24 
GeneralRe: textbox like IE Pin
allen-homen6-Sep-10 20:21
allen-homen6-Sep-10 20:21 
AnswerRe: textbox like IE Pin
V.6-Sep-10 20:25
professionalV.6-Sep-10 20:25 
QuestionDraw line in RichTextBox C# Pin
jojoba20116-Sep-10 4:55
jojoba20116-Sep-10 4:55 
AnswerRe: Draw line in RichTextBox C# Pin
Luc Pattyn6-Sep-10 5:07
sitebuilderLuc Pattyn6-Sep-10 5:07 
GeneralRe: Draw line in RichTextBox C# Pin
OriginalGriff6-Sep-10 5:33
mveOriginalGriff6-Sep-10 5:33 
GeneralRe: Draw line in RichTextBox C# Pin
Luc Pattyn6-Sep-10 5:49
sitebuilderLuc Pattyn6-Sep-10 5:49 
GeneralRe: Draw line in RichTextBox C# Pin
jojoba20116-Sep-10 5:56
jojoba20116-Sep-10 5:56 
GeneralRe: Draw line in RichTextBox C# Pin
Luc Pattyn6-Sep-10 6:06
sitebuilderLuc Pattyn6-Sep-10 6:06 

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.