473,408 Members | 2,734 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,408 software developers and data experts.

How to use COM Interop in C#

I have a requirement to use a dll written in Visual C++ 6.0 in my C#
application. In order to establish the link between my application and the
dll, I have written a ATL COM Component in Visual C++.NET [visual studio .NET
version 8]. This COM component is referenced in my C# application. The COM
component statically links with the 6.0 dll.

I am facing problems in passing data from C# to the dll through the COM
component.

Description:
1. The dll exposes a function as:
__declspec(dllexport) int __stdcall ProblemFunction(int param1, BYTE param2,
BYTE param3, BYTE *param4, DWORD *param5);

2. In the COM wrapper component, I have declared an interface method as:
[id(25), helpstring("method ProblemFunc")] HRESULT ProblemFunc([in] SHORT
param1, [in] BYTE param2, [in] BYTE param3, [in, out] BYTE* param4, [in, out]
LONG* param5, [out, retval] BYTE* param6);

where, param6 is used to return the value returned by dll function to the C#
client application.

The implementation of this interface function is given below:
STDMETHODIMP
Wrapper::ProblemFunc(SHORT param1, BYTE param2, BYTE param3, BYTE* param4,
LONG* param5, BYTE* param6)
{
*param6 = ProblemFunction(param1, param2, param3, param4, (DWORD*)param5);
return S_OK;
}

3. In the C# client application, I am calling the COM function as:
byte returnValue = DllWrapperObject.ProblemFunc(value1, (byte)value2, (byte)
value3, ref value4, ref value5);

Here, I am facing problems passing value4 and value5 because:
a. For value4 I need to pass a structure.
b. For value5 I need to pass the size of the structure being passed in value4.
The structure to be passed is as required by the dll. The C++ structure is:
typedef struct
{
DWORD var1;
DWORD var2;

struct
{
DWORD var3;
char var4[16];
DWORD var5;
} var6[3];
} TEST_STRUCT;

I wrote the structure's equivalent in C# as a class as I had to create an
array. The C# implementation of the above given structure is:
internal class InnerStruct
{
long var3;
char[] var4 = new char[16];
long var5;

internal static int GetSizeOfClass()
{
return (sizeof(long) + sizeof(char) * 16 + sizeof(long));
}
}

internal class TestStruct
{
long var1;
long var2;
InnerStruct[] var6 = new InnerStruct[3];

internal static int GetSizeOfClass()
{
return (sizeof(long) * 2 + InnerStruct.GetSizeOfClass() * 3);
}
}
Questions:
1. Is there any better way to define the structure equivalent in C#?
2. How can I get the size of the structure/class for passing it to the dll?
3. How to pass the handle of the structure/class object from C# to the dll so
that it can fill it up and return it to the client app for future usage?
Feb 17 '06 #1
6 2387
Why don't you call the DLL function directly using PInvoke interop?

Willy.

"Nataraj1978" <u18807@uwe> wrote in message news:5c0096f658234@uwe...
|I have a requirement to use a dll written in Visual C++ 6.0 in my C#
| application. In order to establish the link between my application and the
| dll, I have written a ATL COM Component in Visual C++.NET [visual studio
..NET
| version 8]. This COM component is referenced in my C# application. The COM
| component statically links with the 6.0 dll.
|
| I am facing problems in passing data from C# to the dll through the COM
| component.
|
| Description:
| 1. The dll exposes a function as:
| __declspec(dllexport) int __stdcall ProblemFunction(int param1, BYTE
param2,
| BYTE param3, BYTE *param4, DWORD *param5);
|
| 2. In the COM wrapper component, I have declared an interface method as:
| [id(25), helpstring("method ProblemFunc")] HRESULT ProblemFunc([in] SHORT
| param1, [in] BYTE param2, [in] BYTE param3, [in, out] BYTE* param4, [in,
out]
| LONG* param5, [out, retval] BYTE* param6);
|
| where, param6 is used to return the value returned by dll function to the
C#
| client application.
|
| The implementation of this interface function is given below:
| STDMETHODIMP
| Wrapper::ProblemFunc(SHORT param1, BYTE param2, BYTE param3, BYTE* param4,
| LONG* param5, BYTE* param6)
| {
| *param6 = ProblemFunction(param1, param2, param3, param4, (DWORD*)param5);
| return S_OK;
| }
|
| 3. In the C# client application, I am calling the COM function as:
| byte returnValue = DllWrapperObject.ProblemFunc(value1, (byte)value2,
(byte)
| value3, ref value4, ref value5);
|
| Here, I am facing problems passing value4 and value5 because:
| a. For value4 I need to pass a structure.
| b. For value5 I need to pass the size of the structure being passed in
value4.
|
|
| The structure to be passed is as required by the dll. The C++ structure
is:
| typedef struct
| {
| DWORD var1;
| DWORD var2;
|
| struct
| {
| DWORD var3;
| char var4[16];
| DWORD var5;
| } var6[3];
| } TEST_STRUCT;
|
| I wrote the structure's equivalent in C# as a class as I had to create an
| array. The C# implementation of the above given structure is:
| internal class InnerStruct
| {
| long var3;
| char[] var4 = new char[16];
| long var5;
|
| internal static int GetSizeOfClass()
| {
| return (sizeof(long) + sizeof(char) * 16 + sizeof(long));
| }
| }
|
| internal class TestStruct
| {
| long var1;
| long var2;
| InnerStruct[] var6 = new InnerStruct[3];
|
| internal static int GetSizeOfClass()
| {
| return (sizeof(long) * 2 + InnerStruct.GetSizeOfClass() * 3);
| }
| }
|
|
| Questions:
| 1. Is there any better way to define the structure equivalent in C#?
| 2. How can I get the size of the structure/class for passing it to the
dll?
| 3. How to pass the handle of the structure/class object from C# to the dll
so
| that it can fill it up and return it to the client app for future usage?
Feb 17 '06 #2
I can use PInvoke interop, but as I am new to Interop, I need some code
sample that I can follow, also since the structure that I need pass to the
dll is bit complex, I am unaware as to how to do it.

If you can please provide me some sample code, it will be of great help.

For your information, I am sending the structure details:
when using the dll from VC++ code, we pass a structure to it as a byte
pointer. The dll will populate the structure and return it back to us for
future use.

The structure in VC++ is defined as:
typedef struct
{
DWORD var1;
DWORD var2;

struct
{
DWORD var3;
char var4[16];
DWORD var5;
} var6[3];
} TEST_STRUCT;

In C#, I tried to define the structure as: [StructLayout(LayoutKind.
Sequential, CharSet = CharSet.Ansi)]
internal struct InnerStruct
{
public int var3;
[MarshalAs(ByValTStr, SizeConst = 16)]
public string var4;
public int var5
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
internal struct TestStruct
{
public int var1;
public int var2;
public InnerStruct[3] var6;
}

so that I could get the structure size as:
uint structSize = Marshal.Sizeof( typeof( TestStruct ) );

when I compile the code, I get the error as:
Array size cannot be specified in a variable declaration (try initializing
with a 'new' expression).

so I tried by changing the code as:
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
internal struct TestStruct
{
public int var1;
public int var2;
public InnerStruct[] var6 = new InnerStruct[3];
}

for this I got the error as:
'TestStruct': cannot have instance field initializers in structs.

so I made the following changes to the structure definition:
internal enum StructSizeConstants
{
innerStructSize = 3,
stringLength = 16
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
internal struct InnerStruct
{
public long var3;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)StructSizeConstants.
stringLength)]
public string var4;
public long var5;
}

internal class TestStruct
{
public long var1;
public long var2;
public var3[] InnerStruct = new InnerStruct[(int)StructSizeConstants.
innerStructSize];
}

then I tried to get the length as:
int tempSize = Marshal.SizeOf(typeof(TestStruct));

and created a byte array as:
byte[] tempByteArray = new byte[Marshal.SizeOf(typeof(TestStruct))];

then I called the function as:
byte returnValue = DllWrapperObject.ProblemFunc(value1, (byte)value2, (byte)
value3, ref value4[0], ref value5);

The compilation goes fine, but I get a runtime error as:
Type 'TestApp.Structures.TestStruct' cannot be marshaled as an unmanaged
structure; no meaningful size or offset can be computed.

Can you please help me out...

Regards,
Nataraj.

Willy Denoyette [MVP] wrote:
Why don't you call the DLL function directly using PInvoke interop?

Willy.

Feb 17 '06 #3
hi Nataraj1978,
use the P Invoque to cal a function in a dll is very easy. here is an
example how to do it in c#. this example is a part of a project i wrote last
Year.

The Class SerisedClass is the one who is initiating the communication with
the Dll.
The Dll i am communicating with in the "SerisedDll"
since i want to pass an enum element to my Dll, i have to define how the
enum in that dll looks like . thats why you can see the enum in the
SerisesClass.
To call the function in my code, i just need to call it like this:
SerisedClass. sadio_reset( SerisedClass.slot_type.CARD_0);

here is the code of the SerisedClass:
Caution : you have to write " public static extern" before the function you
are calling.
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace MultiplexerModul
{
public class SerisedClass
{
public enum slot_type
{
CARD_0 = 0,
CARD_1 = 1,
CARD_2 = 2,
CARD_3 = 3,
CARD_4 = 4,
CARD_5 = 5,
CARD_6 = 6,
CARD_7 = 7
};

[DllImport("Serised.dll")]
public static extern int sadio_reset( slot_type slot_nr);
}
}

I hope this will solve your problem. if not, just mail me.
cu

"Nataraj1978" wrote:
I can use PInvoke interop, but as I am new to Interop, I need some code
sample that I can follow, also since the structure that I need pass to the
dll is bit complex, I am unaware as to how to do it.

If you can please provide me some sample code, it will be of great help.

For your information, I am sending the structure details:
when using the dll from VC++ code, we pass a structure to it as a byte
pointer. The dll will populate the structure and return it back to us for
future use.

The structure in VC++ is defined as:
typedef struct
{
DWORD var1;
DWORD var2;

struct
{
DWORD var3;
char var4[16];
DWORD var5;
} var6[3];
} TEST_STRUCT;

In C#, I tried to define the structure as: [StructLayout(LayoutKind.
Sequential, CharSet = CharSet.Ansi)]
internal struct InnerStruct
{
public int var3;
[MarshalAs(ByValTStr, SizeConst = 16)]
public string var4;
public int var5
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
internal struct TestStruct
{
public int var1;
public int var2;
public InnerStruct[3] var6;
}

so that I could get the structure size as:
uint structSize = Marshal.Sizeof( typeof( TestStruct ) );

when I compile the code, I get the error as:
Array size cannot be specified in a variable declaration (try initializing
with a 'new' expression).

so I tried by changing the code as:
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
internal struct TestStruct
{
public int var1;
public int var2;
public InnerStruct[] var6 = new InnerStruct[3];
}

for this I got the error as:
'TestStruct': cannot have instance field initializers in structs.

so I made the following changes to the structure definition:
internal enum StructSizeConstants
{
innerStructSize = 3,
stringLength = 16
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
internal struct InnerStruct
{
public long var3;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = (int)StructSizeConstants.
stringLength)]
public string var4;
public long var5;
}

internal class TestStruct
{
public long var1;
public long var2;
public var3[] InnerStruct = new InnerStruct[(int)StructSizeConstants.
innerStructSize];
}

then I tried to get the length as:
int tempSize = Marshal.SizeOf(typeof(TestStruct));

and created a byte array as:
byte[] tempByteArray = new byte[Marshal.SizeOf(typeof(TestStruct))];

then I called the function as:
byte returnValue = DllWrapperObject.ProblemFunc(value1, (byte)value2, (byte)
value3, ref value4[0], ref value5);

The compilation goes fine, but I get a runtime error as:
Type 'TestApp.Structures.TestStruct' cannot be marshaled as an unmanaged
structure; no meaningful size or offset can be computed.

Can you please help me out...

Regards,
Nataraj.

Willy Denoyette [MVP] wrote:
Why don't you call the DLL function directly using PInvoke interop?

Willy.

Feb 17 '06 #4
Thanks for the example on using PInvoke Willy... but as I have mentioned
earlier, I am facing problems in accomplishing the following tasks:

1. Defining the equivalent complex structure in C#.
2. Determining the size of the structure using sizeof or its equivalent.
3. Passing the structure object from C# to the VC++ 6.0 dll as a byte pointer.
It would be of great help if you could provide me some information on these...
Regards,
Nataraj

Entwickler wrote:
hi Nataraj1978,
use the P Invoque to cal a function in a dll is very easy. here is an
example how to do it in c#. this example is a part of a project i wrote last
Year.

The Class SerisedClass is the one who is initiating the communication with
the Dll.
The Dll i am communicating with in the "SerisedDll"
since i want to pass an enum element to my Dll, i have to define how the
enum in that dll looks like . thats why you can see the enum in the
SerisesClass.
To call the function in my code, i just need to call it like this:
SerisedClass. sadio_reset( SerisedClass.slot_type.CARD_0);

here is the code of the SerisedClass:
Caution : you have to write " public static extern" before the function you
are calling.
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace MultiplexerModul
{
public class SerisedClass
{
public enum slot_type
{
CARD_0 = 0,
CARD_1 = 1,
CARD_2 = 2,
CARD_3 = 3,
CARD_4 = 4,
CARD_5 = 5,
CARD_6 = 6,
CARD_7 = 7
};

[DllImport("Serised.dll")]
public static extern int sadio_reset( slot_type slot_nr);

}
}

I hope this will solve your problem. if not, just mail me.
cu
I can use PInvoke interop, but as I am new to Interop, I need some code
sample that I can follow, also since the structure that I need pass to the

[quoted text clipped - 104 lines]
>
>Willy.

Feb 17 '06 #5
Nataraj1978,
if you can understand the example i send then u will solve ur problem. just
try to understand how it works. for ur struct you will just have to replace
the enum in my example with ur structure. Note that u can pass the structure
the structure to ur function in the dll only if ur function is expecting the
struct as parameter.

Regards
Entwickler

"Nataraj1978" wrote:
Thanks for the example on using PInvoke Willy... but as I have mentioned
earlier, I am facing problems in accomplishing the following tasks:

1. Defining the equivalent complex structure in C#.
2. Determining the size of the structure using sizeof or its equivalent.
3. Passing the structure object from C# to the VC++ 6.0 dll as a byte pointer.
It would be of great help if you could provide me some information on these...
Regards,
Nataraj

Entwickler wrote:
hi Nataraj1978,
use the P Invoque to cal a function in a dll is very easy. here is an
example how to do it in c#. this example is a part of a project i wrote last
Year.

The Class SerisedClass is the one who is initiating the communication with
the Dll.
The Dll i am communicating with in the "SerisedDll"
since i want to pass an enum element to my Dll, i have to define how the
enum in that dll looks like . thats why you can see the enum in the
SerisesClass.
To call the function in my code, i just need to call it like this:
SerisedClass. sadio_reset( SerisedClass.slot_type.CARD_0);

here is the code of the SerisedClass:
Caution : you have to write " public static extern" before the function you
are calling.
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace MultiplexerModul
{
public class SerisedClass
{
public enum slot_type
{
CARD_0 = 0,
CARD_1 = 1,
CARD_2 = 2,
CARD_3 = 3,
CARD_4 = 4,
CARD_5 = 5,
CARD_6 = 6,
CARD_7 = 7
};

[DllImport("Serised.dll")]
public static extern int sadio_reset( slot_type slot_nr);

}
}

I hope this will solve your problem. if not, just mail me.
cu
I can use PInvoke interop, but as I am new to Interop, I need some code
sample that I can follow, also since the structure that I need pass to the

[quoted text clipped - 104 lines]
>
>Willy.

Feb 17 '06 #6
When using PInvoke to call the DLL export function, you'll have to custom
marshal the structures.
Following is a sample how you can achieve this....

[C++]
....

typedef struct
{
int var1;
int var2;

struct
{
int var3;
char var4[16];
int var5;
} var6[3];
} TEST_STRUCT;

extern "C" {
__declspec( dllexport ) void Test(TEST_STRUCT* p);
}
// fuction that takes a pointer to a struct of type TEST_STRUCT (or any
other pointer, bu then you need a cast)
void Test(TEST_STRUCT* p)
{
// optionally clear structure passed-in
// memset(p, 0, sizeof(TEST_STRUCT));
// fill struct with some data
p->var1 = 123;
p->var2 = 456;
for (int i = 0; i < 3; i++)
{
p->var6[i].var3 = i;
p->var6[i].var5 = i * i;
}
return;
}
[C#]
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)]
public class TestStruct
{
public int var1;
public int var2;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3 * 24)] // Size of
Inner * number elem.
public byte[] InnerArray;
}
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)]
public class Inner
{
public int var3;
[MarshalAs(UnmanagedType.ByValArray, SizeConst=16)]
public char[] var4;
public int var5;
}

//---------------
static void ex2()
{

TestStruct ts = new TestStruct();
Inner tsInner = new Inner();
int innerLength = 3; // numer Inner elements
Inner[] arInner = new Inner[innerLength];
int arBytes = Marshal.SizeOf(tsInner);
IntPtr ptrts = Marshal.AllocHGlobal( Marshal.SizeOf(ts));
IntPtr ptria = Marshal.AllocHGlobal(arBytes);
Test(ptrts); // call function
// marshal back and dump the data returned...
Marshal.PtrToStructure(ptrts, ts);
Console.WriteLine(ts.var1);
Console.WriteLine(ts.var2);
for (int i = 0; i < innerLength; i++ )
{
int displ = i * arBytes;
Marshal.Copy(ts.InnerArray, displ , ptria, arBytes);
tsInner = new Inner();
Marshal.PtrToStructure(ptria, tsInner);
arInner[i] = tsInner;
}
for (int n = 0; n < arInner.Length ; n++)
{
Console.WriteLine("{0} - {1}", arInner[n].var3, arInner[n].var5);
}

Marshal.FreeHGlobal(ptrts);
Marshal.FreeHGlobal(ptria);
}

Willy.
"Nataraj1978" <u18807@uwe> wrote in message news:5c027be2ed7c6@uwe...
|I can use PInvoke interop, but as I am new to Interop, I need some code
| sample that I can follow, also since the structure that I need pass to the
| dll is bit complex, I am unaware as to how to do it.
|
| If you can please provide me some sample code, it will be of great help.
|
| For your information, I am sending the structure details:
| when using the dll from VC++ code, we pass a structure to it as a byte
| pointer. The dll will populate the structure and return it back to us for
| future use.
|
| The structure in VC++ is defined as:
| typedef struct
| {
| DWORD var1;
| DWORD var2;
|
| struct
| {
| DWORD var3;
| char var4[16];
| DWORD var5;
| } var6[3];
| } TEST_STRUCT;
|
| In C#, I tried to define the structure as: [StructLayout(LayoutKind.
| Sequential, CharSet = CharSet.Ansi)]
| internal struct InnerStruct
| {
| public int var3;
| [MarshalAs(ByValTStr, SizeConst = 16)]
| public string var4;
| public int var5
| }
| [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
| internal struct TestStruct
| {
| public int var1;
| public int var2;
| public InnerStruct[3] var6;
| }
|
| so that I could get the structure size as:
| uint structSize = Marshal.Sizeof( typeof( TestStruct ) );
|
| when I compile the code, I get the error as:
| Array size cannot be specified in a variable declaration (try initializing
| with a 'new' expression).
|
| so I tried by changing the code as:
| [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
| internal struct TestStruct
| {
| public int var1;
| public int var2;
| public InnerStruct[] var6 = new InnerStruct[3];
| }
|
| for this I got the error as:
| 'TestStruct': cannot have instance field initializers in structs.
|
| so I made the following changes to the structure definition:
| internal enum StructSizeConstants
| {
| innerStructSize = 3,
| stringLength = 16
| }
|
| [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
| internal struct InnerStruct
| {
| public long var3;
| [MarshalAs(UnmanagedType.ByValTStr, SizeConst =
(int)StructSizeConstants.
| stringLength)]
| public string var4;
| public long var5;
| }
|
| internal class TestStruct
| {
| public long var1;
| public long var2;
| public var3[] InnerStruct = new InnerStruct[(int)StructSizeConstants.
| innerStructSize];
| }
|
| then I tried to get the length as:
| int tempSize = Marshal.SizeOf(typeof(TestStruct));
|
| and created a byte array as:
| byte[] tempByteArray = new byte[Marshal.SizeOf(typeof(TestStruct))];
|
| then I called the function as:
| byte returnValue = DllWrapperObject.ProblemFunc(value1, (byte)value2,
(byte)
| value3, ref value4[0], ref value5);
|
| The compilation goes fine, but I get a runtime error as:
| Type 'TestApp.Structures.TestStruct' cannot be marshaled as an unmanaged
| structure; no meaningful size or offset can be computed.
|
| Can you please help me out...
|
| Regards,
| Nataraj.
|
| Willy Denoyette [MVP] wrote:
| >Why don't you call the DLL function directly using PInvoke interop?
| >
| >Willy.
Feb 17 '06 #7

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

Similar topics

0
by: roy | last post by:
I try to call com written in VB 6.0. When I use VS.net Studio to do the debuging, some time it works fine, some time I got the following message: Server Error in '/GISOnlineReservation'...
0
by: roy | last post by:
I try to call com written in VB 6.0., some time it works fine, some time I got the following message: Server Error in '/GISOnlineReservation' Application....
0
by: keefah | last post by:
Hi, I'm writing a C# web app that uses Outlook to send email. I use a reference to the Microsoft Outlook 11.0 Object Library, but it's giving me problems. I tracked down some stuff on the Net...
0
by: lacour | last post by:
I can't seem to figure out the difference between adding a COM dll reference in VS2003 and by using TLBIMP. I have a COM dll that references another COM dll, and I want the syntax of my...
1
by: Nadav | last post by:
Hi, Introduction *************** I have a system build of a collection of 'Native COM objects' and '.NET COM interop' objects, all of the COM objects are managed through a 'Native COM' layer,...
8
by: Rob Edwards | last post by:
When trying to add the Microsoft CDO for Exchange Management Library (aka CDOEXM.dll) I receive the following message: "A reference to 'Microsoft CDO for Exchange Management Library' could not be...
7
by: R Reyes | last post by:
Can someone please explain to me why I can't get the MS Word Interop assembly to work in my VS2005 project? I'm trying to manipulate MS Word from my Web Form application and I can't get passed...
2
by: JC | last post by:
Anybody knows what problem has this code? I think, in the Garbage Collector? You know the Solution? The program in the test's case, whit 350 contacts, run OK before number 86. The error is a...
1
by: allbelonging | last post by:
C#.Net Outlook 2003 automation (programmatically) with Office.Interop.Outlook Problem: I have my outlook 2003 configured with multiple mailbox on my local machine. I want to specify the mailbox...
0
by: Tina | last post by:
I've gotten this before where it says there is a problem with Interop.MSDASC but I can't remember what causes this. This is a 1.1 app I'm trying to debug in vs2005. It was running yesterday just...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
marktang
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,...
0
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...
0
Oralloy
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.