|
by: Jim |
last post by:
I have to access a third party api to work with their
hardware. Everything was going great UNTIL I ran into the
problem of C# char being 16 bits and the C char being 8
bits. I cannot seem to cast the string properly to use it
in the unmanaged code.
I have tried to use the MarshalAs function in my DllImport
statement but that didn't work.
What i need is to take a string of numbers and convert it
|
by: James Geurts |
last post by:
Hi all,
I'm trying to convert a string representing a path to Dos 8.3 notation. The code that I have works fine if the path exists, but it will not work if the path does not exist. I am looking for a way to convert a string representing a long file path (whether or not it exists) to short (dos 8.3) form. This is what I have:
private string GetShortPath(string longPath) {
if (longPath.Length <= 8) {
return longPath;
}
StringBuilder...
|
by: Mel WEaver |
last post by:
Hello,
I have the following delphi structure for a binary file. I'm looking
for idea how to read this file.
Mel
type
TMenuDataStruct = packed record
exename : string;
|
by: Albert Jan |
last post by:
Hi,
I have text from mime email messages with different encoding that I want to
convert to utf-8, but I'm relatively new on encoding problems.
I use the following code, but this doesn't seem to work (the in and output
remains the same):
string
x=toUTF8("=?GB2312?B?s8q5q8u+vq3A7aGissbO8bK/w8W1xNK7t+LQxQ==?=","GB2312");
|
by: Albert Jan |
last post by:
Hi,
in my quest to properly display email messages I have overcome the problem
of decoding strings like
"=?GB2312?B?s8q5q8u+vq3A7aGissbO8bK/w8W1xNK7t+LQxQ==?="
(which appears to be an 'encoded-word' as is explained in rfc2047), by using
Convert.FromBase64String as Stefen kindly suggested (my post from
yesterday).
|
|
by: Gee |
last post by:
Hi
Can anyone help me convert this to C# please?
Structure NETRESOURCE
Public dwScope As Int32
Public dwType As Int32
Public dwDisplayType As Int32
Public dwUsage As Int32
Public lpLocalName As String
|
by: Gee |
last post by:
I get the above error with this code and I can't figure out why? Any
ideas please? See code below - the actual error is included in the
code:
public struct NETRESOURCE
{
public Int32 dwScope ;
public Int32 dwType;
public Int32 dwDisplayType;
|
by: Marc |
last post by:
Hello dear,
I have a string and every second char is a \0. Can I somehow convert it to a
normal string. Or may-be in the underlying code I am doing something wrong,
choose the wrong C# type?
This is my function I am trying to get right:
public static bool GetPrivateProfileSectionAsCS(string appName, string
fileName, out string section)
|
by: jg007 |
last post by:
Hi,
I have some code that somebody has vritten in C and although I have got it to roughly work it is hard going and I can't get it to do exactly what I want as I know even less about c than I do about VB :)
I have chopped the code a bit so I hope it makes enough sense, what I am trying to do is load a remote registry in from a server , make some changes and then unload it.later.
I have google'd quite a bit but I can only find C or VB6...
|
by: =?iso-8859-1?B?S2VyZW0gR/xtcvxrY/w=?= |
last post by:
Hi,
i am a little stuck here, how do i convert this from C Structure
to an structure in C# that can be marshalled:
typedef struct _DEV_BROADCAST_DEVICEINTERFACE {
DWORD dbcc_size;
DWORD dbcc_devicetype;
DWORD dbcc_reserved;
GUID dbcc_classguid;
|
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 usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
|
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
|
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|