How to marshal things ...

G

Guest

Hi!

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

STATUS LNPUBLIC ConvertTextToTIMEDATE(
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
 
R

rowe_newsgroups

Hi!

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

STATUS LNPUBLIC ConvertTextToTIMEDATE(
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 ConvertTextToTIMEDATE(
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.ToString("M/d/yyyy")

Thanks,

Seth Rowe
 
G

Guest

Hi!

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

Regards,
Markward

rowe_newsgroups said:
Hi!

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

STATUS LNPUBLIC ConvertTextToTIMEDATE(
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 ConvertTextToTIMEDATE(
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.ToString("M/d/yyyy")

Thanks,

Seth Rowe
 
R

rowe_newsgroups

Hi!

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

Regards,
Markward

rowe_newsgroups said:
Hi!
I wonder, how the declaration of the following c-function must look like in
VB.NET
STATUS LNPUBLIC ConvertTextToTIMEDATE(
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...
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.ToString("M/d/yyyy")

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top