-
- struct array?why?
by wenliang
- 4 Replies
- Last post
by wenliang
- my code listed below:
struct mystruct1 { public int x; public int y; };
struct mystruct2 { public int a; public mystruct1[] my1;
public mystruct2(int x) { a = 100; my1 = new mystruct1[x]; } };
struct mystruct3 { public int b; public mystruct2[] my2;
public mystruct3(int x) { b = 22; my2 = new mystruc
-
- How to get the version of InstallUtil.exe being used at run time
by Flea#
- 1 Replies
- Last post
by H. (¶¬) Tony
- Hello,
I have an application that uses a PerformanceCounterInstaller to install custom Performance Counters onto servers. The problem I am running into is that when this application runs the installer, I need to be able to determine if its using the 2.0 InstallUtil.exe or the 1.1 InstallUtil.exe because the PerformanceCounters break when being ran under the 2.0 InstallUtil.exe. I have a fix
-
- C# Interop causing memory leak
by Grenwood
- 4 Replies
- Last post
by Grenwood
- I'm having a very strange issue with an inter-op between my C# application and an unmanaged DLL written in C++. The problem is that I have a memory leak on the C# application. I'm mostly a C++ programmer so I'm having great difficulty debugging it. Commenting out all calls to my unmanaged DLL will remove the memory leak error however, so I'm sure it has something to do with the inter-op. I tried t
-
- Application settings lost upon new assembly
by Jef Patat
- 10 Replies
- Last post
by Mark Benningfield
- Hi all,
I'm facing the same problem as issued in this topic .
I tried the solution with ApplicationSettingsBase.Upgrade() but it doesn't work out. First of all I need to put System.Configuration in front of it, I don't know if this really matters. Second my intellisense only offers me .Equals, .ReferenceEquals and .Synchronized but no Upgrade.
My application is working correctly, I assig
-
- call a function in a class in c#
by Donald Weil
- 2 Replies
- Last post
by Jeffrey Knight
- Being new to C# I have a problem
I Have this code that works in a form button that I placed into a class ( I have done this in vb and asp.net) but can not get it to work. Here is the code
the form code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows
-
- using a static procedure
by AlexBB
- 2 Replies
- Last post
by AlexBB
- I need a conceptual clarification on usefullness or appropriateness of using static vs <dynamic> procedures.
It is C# code.
This is my background. I have this Windows.Forms app that accumulated a lot of code in the main form. It has become unstable because of that. At one point it had close to 30,000 lines of source code. I partially lost control over it. In particular I found
-
- How to implement embedded interface?
by daniel mark
- 5 Replies
- Last post
by rajitha aththanayake
- Hello all:
I have an interface as follows:
Code Snippet
public interface IBook {
string ISBN { get; } IPage Page { get; } }
public interface IPage { bool IsUsed {get;}
int NumPages { get; } }
How can I implement the interface IBook
Thank you
-Daniel
-
- Help me in C# Windows Service ??
by Space Cracker
- 13 Replies
- Last post
by Space Cracker
- Dear All , I want to make a windows service to read data from Windows Registery ( using C# 2005) i try to read data from registery but always return Empty value althogh the same code i use in Windwos Application and work perfect So please me in Reading values from Windows registery
-
- C# advantages over C++
by sham_huss
- 7 Replies
- Last post
by abcdefgqwerty2
- Hi i am doing a project and wondering if someone could provide me with some fact based information on the advantages of C# over C++. Thanks
-
- Convert native BYTE* to managed byte array
by gudguy
- 5 Replies
- Last post
by gudguy
- im using a third party component that triggers an event whenever a data is available. the function signature is (int height, int width, long hDC, int size, BYTE* data) the "data" argument points to a bitmap data in the memory. given the "size" and "BYTE*" arguments, how can I retrieve the byte array (managed) pointed to by "BYTE* data" (unmanaged) regards,
-
- structure or object containing messages for user
by kinso
- 1 Replies
- Last post
by Citizen on the earth
- Hi, What would you suggest as a structure (or object, or whatever) that can be used as an aggregation of messages that I can grab and post back to the user For instance, I am communicating with a device and I want to update the GUI for the user to know that the device has just done "something," but the device only has an ACK or a NACK response. Thus, I need to take that response and grab
-
- 2+2=22
by Giggig guy
- 5 Replies
- Last post
by timvw
- hi
when i get my code to add 2 text boxes together eg textbox 1 contains 2 and textbox 2 contains 2 the result text box will show the result 22 but there are no errors being shown how can i solve this problem
-
- Graphics
by D_III
- 5 Replies
- Last post
by Dilmer
- Hello,
I'm looking for a code sample for creating graphics, edit pictures and save/load them. Can someone help me
-
- which is the best way to desgin a bussiness model, class or struct?
by sharpMoon
- 10 Replies
- Last post
by sharpMoon
- i develop a B/S project which include below: WEB - web project - UI BLL - class library - Business Logic DAL - class libaray - Data Access Model - class library - Business Model when i design the business model, for example BookInfo, i am confused for create it with class BookInfo or struct BookInfo. who can give me a guide thx in adv
-
- Is there anything equavilant to this in c#.net??
by adorer
- 2 Replies
- Last post
by adorer
- this is a vb.net code help me to convert string to hex...
Microsoft.VisualBasic. Right ("00" & Hex(b(i)), 2)
is there any method or class or anything give me the same result of this in c#.net ...
help me please..
thanks in advance
-
- ReferencedAssemblies of CompilerParameters
by heavenlycharmus
- 2 Replies
- Last post
by GeniusLife
- Hi, I am developing a class that compiles an external C# code, and the following is part of my program: CSharpCodeProvider compiler = new CSharpCodeProvider(); CompilerParameters Parameters = new CompilerParameters(); Parameters.ReferencedAssemblies.Add("System.Data.dll"); Parameters.GenerateExecutable = false; Parameters.GenerateInMemory = true;
-
- COM registration
by Anu Viswan
- 14 Replies
- Last post
by Anu Viswan
- Hi
i am getting following warning when i run my application. the project is to be registered as com interop.
Warning 2 "D:\My Codes\C# Codes\DataGen\Controlling Shell\DBConnectionWizard\bin\Debug\DBConnectionWizard.dll" does not contain any types that can be registered for COM Interop. DBConnectionWizard
can any one help
i would also like to know if there is
-
- I cannot get Intellisense to work in C#
by JeradM
- 6 Replies
- Last post
by franz1999
- When I start a new project, as soon as a put just a few components on a form and start writing code for an event, Intellisense stops working. I have to holf Ctrl+Space to see the options, step through the alphabet by typing a character at a time and holding Ctrl+Sapce again to see the next set of options. How can I get Intellisense to work
Note that I have found solutions to what appears to be
-
- Wrapping Callbacks from Unmanaged c++ in compact framework
by patti_nyl
- 1 Replies
- Last post
by patti_nyl
- Hi, I am having a problem with Callbacks.
I have a C++ dll that I am wrapping into C# but having difficults with its callbacks. How do I do it in C# compact framework.
In my C++ dll object I have defined following
typedef int (*MessageFunction)( const char *Message, const unsigned length);
CANopenConfStatus RegisterCallbackMessageFp(MessageFunction messageFuncPointer);
-
- How to write typedef structs and unions in C#
by Axe22
- 10 Replies
- Last post
by jo0ls
- I have this code from a C++ project I want to migrate to C#. How would I write this in C#
typedef struct _hdr_struct { char fileType[ 4]; union { char fileVersion[ 4]; struct { char v; char major; char dot; char minor; } versi
-
- Handling Exceptions from inside threads?
by rodniko
- 10 Replies
- Last post
by Matthew Watson
- override public void RunThread()
{
try
{
while ( true )
{
Thread .Sleep(1);
Connect();
}
}
catch ( Exception Err)
{
throw new Exception(Err.Message); // Error : "Exception was unhandled"
}
i create the thread like that :
this .SearchThread = new Thread ( new ThreadStar
-
- Windows file/folder icons HELP
by meNu
- 5 Replies
- Last post
by boban.s
- Does anyone know how you can get access or if you can get access to the file/folder icons I.E. an .avi extension file has an avi file icon. Can you access them and use them in a windows application
-
- simplest way to pass values.
by airwalker2000
- 14 Replies
- Last post
by airwalker2000
- Hi there, what is the simplest way to pass value from one place to another.
for example on an ascx page I have a sql select statement that is assigned to a string (string sqlText = "select * from users"
what I want to do is display that sql statment (not the result of the statment) in a text box on a aspx page.
what is the simplest way to do this.
ps: Im a be
-
- C# interoperability
by paCHA0S
- 3 Replies
- Last post
by Greg Beech
- Hello, I am an intern for a company with a robotics SDK as one of their products. This SDK is written in native C/C++ code and is platform independent. My current task is to research and possibly implement this SDK as a DLL that can link to C#. I've found lots of basic information on DLLs and interoperability techniques (i.e. PInvoke, COM, wrapper classes, dllexports/dllimports). And I've even bee
-
- Vector type in .NET
by Azurewrath
- 9 Replies
- Last post
by Azurewrath
- Hi all, I thought there was no built in vector data type in .NET, but in the help it shows that there is: http://msdn2.microsoft.com/en-us/library/system.windows.vector.aspx I still can't find a way to create one though. Is this real Thanks, Aw