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 3 2617
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
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
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 class), how to decide if
"sizeof(MyStruct)" would fail before calling sizeof and having to use
Marshal.sizeof? TIA
public struct MyStruct
{
|
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 code?
Thanks
PS I added the +1 because as I understand the GetLogicalDriveStrings doc
|
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)
>>> type(bytes)
<type 'str'>
|
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.
System.Runtime.InteropServices.Marshal.WriteInt32 used to work fine but
now is misbehaving.
I wrote some native-code (C++) alternates to some Marshal methods and...
|
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 problem was reported in another thread here by Peter Hansen...
| |
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
str(123) == str("123")
or are they different?
|
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
Marshal.PtrToStructure to copy the all the data into the "other"
array?
unsafe public struct DeadReckoning
{
|
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 Detail(int _age)
|
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 each COM object explicit by a call to
Marshal.ReleaseComObject, does the RCW take care of that or does it
leaks
unmanaged resources?
|
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 ToRaw1()
{
byte byteArray = new byte;
IntPtr pointer = Marshal.AllocHGlobal(Size);
Marshal.StructureToPtr(this, pointer, false);...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |