How to marshal things ...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?TWFya3dhcmQgU2NodWJlcnQ=?=

    #1

    How to marshal things ...

    Hi!

    I wonder, how the declaration of the following c-function must look like in
    VB.NET

    STATUS LNPUBLIC ConvertTextToTI MEDATE(
    const void far *IntlFormat,
    const TFMT far *TextFormat,
    char far * far *Text,
    WORD MaxLength,
    TIMEDATE far *retTIMEDATE);

    Especially the pointer to pointer of Text is causing me headache.

    The Second Question is, how to declare a struct with string-members like:

    typedef struct {
    ....
    char TodayString[YTSTRMAX]; /* String denoting current day */
    ....
    } INTLFORMAT

    Regards,
    Markward


  • rowe_newsgroups

    #2
    Re: How to marshal things ...

    On Apr 11, 10:02 am, Markward Schubert
    <MarkwardSchub. ..@discussions. microsoft.comwr ote:
    Hi!
    >
    I wonder, how the declaration of the following c-function must look like in
    VB.NET
    >
    STATUS LNPUBLIC ConvertTextToTI MEDATE(
    const void far *IntlFormat,
    const TFMT far *TextFormat,
    char far * far *Text,
    WORD MaxLength,
    TIMEDATE far *retTIMEDATE);
    >
    Especially the pointer to pointer of Text is causing me headache.
    >
    The Second Question is, how to declare a struct with string-members like:
    >
    typedef struct {
    ...
    char TodayString[YTSTRMAX]; /* String denoting current day */
    ...
    >
    } INTLFORMAT
    >
    Regards,
    Markward
    I apologize that I'm not a C programmer, so I can't help you convert
    the code to VB. But I think I may still be able to help...
    STATUS LNPUBLIC ConvertTextToTI MEDATE(
    const void far *IntlFormat,
    const TFMT far *TextFormat,
    char far * far *Text,
    WORD MaxLength,
    TIMEDATE far *retTIMEDATE);
    This turns some text (a string) into a DateTime right? If so just use
    DateTime.Parse( string) instead - no need to create your own method.
    The Second Question is, how to declare a struct with string-members like:
    >
    typedef struct {
    ...
    char TodayString[YTSTRMAX]; /* String denoting current day */
    While you could create a structure for this, it seems like a waste to
    me. If you need a string denoting the current date just use
    DateTime.Now.To String("M/d/yyyy")

    Thanks,

    Seth Rowe

    Comment

    • =?Utf-8?B?TWFya3dhcmQgU2NodWJlcnQ=?=

      #3
      Re: How to marshal things ...

      Hi!

      Thanks for your reply, but the datarype here is TIMEDATE, wich is a Lotus
      Notes specific type, different from DateTime.

      Regards,
      Markward

      "rowe_newsgroup s" wrote:
      On Apr 11, 10:02 am, Markward Schubert
      <MarkwardSchub. ..@discussions. microsoft.comwr ote:
      Hi!

      I wonder, how the declaration of the following c-function must look like in
      VB.NET

      STATUS LNPUBLIC ConvertTextToTI MEDATE(
      const void far *IntlFormat,
      const TFMT far *TextFormat,
      char far * far *Text,
      WORD MaxLength,
      TIMEDATE far *retTIMEDATE);

      Especially the pointer to pointer of Text is causing me headache.

      The Second Question is, how to declare a struct with string-members like:

      typedef struct {
      ...
      char TodayString[YTSTRMAX]; /* String denoting current day */
      ...

      } INTLFORMAT

      Regards,
      Markward
      >
      I apologize that I'm not a C programmer, so I can't help you convert
      the code to VB. But I think I may still be able to help...
      >
      STATUS LNPUBLIC ConvertTextToTI MEDATE(
      const void far *IntlFormat,
      const TFMT far *TextFormat,
      char far * far *Text,
      WORD MaxLength,
      TIMEDATE far *retTIMEDATE);
      >
      This turns some text (a string) into a DateTime right? If so just use
      DateTime.Parse( string) instead - no need to create your own method.
      >
      The Second Question is, how to declare a struct with string-members like:

      typedef struct {
      ...
      char TodayString[YTSTRMAX]; /* String denoting current day */
      >
      While you could create a structure for this, it seems like a waste to
      me. If you need a string denoting the current date just use
      DateTime.Now.To String("M/d/yyyy")
      >
      Thanks,
      >
      Seth Rowe
      >
      >

      Comment

      • rowe_newsgroups

        #4
        Re: How to marshal things ...

        On Apr 11, 10:30 am, Markward Schubert
        <MarkwardSchub. ..@discussions. microsoft.comwr ote:
        Hi!
        >
        Thanks for your reply, but the datarype here is TIMEDATE, wich is a Lotus
        Notes specific type, different from DateTime.
        >
        Regards,
        Markward
        >
        "rowe_newsgroup s" wrote:
        On Apr 11, 10:02 am, Markward Schubert
        <MarkwardSchub. ..@discussions. microsoft.comwr ote:
        Hi!
        >
        I wonder, how the declaration of the following c-function must look like in
        VB.NET
        >
        STATUS LNPUBLIC ConvertTextToTI MEDATE(
        const void far *IntlFormat,
        const TFMT far *TextFormat,
        char far * far *Text,
        WORD MaxLength,
        TIMEDATE far *retTIMEDATE);
        >
        Especially the pointer to pointer of Text is causing me headache.
        >
        The Second Question is, how to declare a struct with string-members like:
        >
        typedef struct {
        ...
        char TodayString[YTSTRMAX]; /* String denoting current day */
        ...
        >
        } INTLFORMAT
        >
        Regards,
        Markward
        >
        I apologize that I'm not a C programmer, so I can't help you convert
        the code to VB. But I think I may still be able to help...
        >
        STATUS LNPUBLIC ConvertTextToTI MEDATE(
        const void far *IntlFormat,
        const TFMT far *TextFormat,
        char far * far *Text,
        WORD MaxLength,
        TIMEDATE far *retTIMEDATE);
        >
        This turns some text (a string) into a DateTime right? If so just use
        DateTime.Parse( string) instead - no need to create your own method.
        >
        The Second Question is, how to declare a struct with string-members like:
        >
        typedef struct {
        ...
        char TodayString[YTSTRMAX]; /* String denoting current day */
        >
        While you could create a structure for this, it seems like a waste to
        me. If you need a string denoting the current date just use
        DateTime.Now.To String("M/d/yyyy")
        >
        Thanks,
        >
        Seth Rowe
        Sorry about that - I was assuming the timedate was the C type for
        datetime. I'm guessing that Lotus Notes has an SDK available for
        VB.Net? If it does check to see if it exposes the TIMEDATE type,
        because then you may be able to cast the datetime into the timedate
        using DirectCast or CType.

        Thanks,

        Seth Rowe

        Comment

        Working...