473,382 Members | 1,583 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

How to marshal things ...

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
Apr 11 '07 #1
3 2613
On Apr 11, 10:02 am, Markward Schubert
<MarkwardSchub...@discussions.microsoft.comwrote :
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

Apr 11 '07 #2
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" wrote:
On Apr 11, 10:02 am, Markward Schubert
<MarkwardSchub...@discussions.microsoft.comwrote :
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

Apr 11 '07 #3
On Apr 11, 10:30 am, Markward Schubert
<MarkwardSchub...@discussions.microsoft.comwrote :
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" wrote:
On Apr 11, 10:02 am, Markward Schubert
<MarkwardSchub...@discussions.microsoft.comwrote :
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
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

Apr 11 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: William Stacey | last post by:
Using the following struct def, how can I tell (using reflection) if "ba" has the marshal attribute and get the "ByValArray" and maybe even the size? In the bigger picture, given a struct (or a...
13
by: Just Me | last post by:
The following almost works. The problem is Marshal.PtrToStringAuto seems to terminate at the first null so I don't get the full string. Any suggestions on how to fix this? Or how to improve the...
21
by: Mike | last post by:
Hi, The example below shows that result of a marshaled data structure is nothing but a string >>> data = {2:'two', 3:'three'} >>> import marshal >>> bytes = marshal.dumps(data) >>>...
6
by: william.thorpe.b | last post by:
I have recently switched from VS2003 to VS2005 and at the same time from V1 to V2 of the .NET Compact Framework. The target is a Windows CE 5.0 device and an ARMV4I processor. ...
2
by: Pierre Rouleau | last post by:
Hi all, When using Python 2.4.x on a Win32 box, marshal.loads(marshal.dumps(1e66666)) returns 1.0 instead of infinity as it should and does under Python 2.5 (also running on Win32 ). This...
5
by: Anurag | last post by:
I have been chasing a problem in my code since hours and it bolis down to this import marshal marshal.dumps(str(123)) != marshal.dumps(str("123")) Can someone please tell me why? when...
2
by: O.B. | last post by:
When using Marshal to copy data from a byte array to the structure below, only the first byte of the "other" array is getting copied from the original byte array. What do I need to specify to get...
0
by: Charming12 | last post by:
Hi All, I have a strange problem and due to my inefficiency with IntPtr i am unable to figure it out. I have an structure something like: public struct Detail { public int age; public...
0
by: xrxst32 | last post by:
Hello there, I have some doubts about the best practice for using COM automation, the Runtime Callable Wrapper (RCW) and Marshal.ReleaseComObject. So the question is/are: Do I need to release...
2
by: O.B. | last post by:
I have operation within a class that marshals the data into a byte array. Below are three different ways that work. Are there any downsides to using one over the the other? public virtual byte...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.