|
Hi,
thanks for your fast answer. I converted a PPC project from VS 2003 to VS2005. As I read within different forums, the style of the resx file changed. I get the following error:
Invalid Resx file. Invalid Resx input. Valid resheader-Tags for reader and write type names could not be found.
To convert the old resx files there should be a tool called regenresx, but this is not available anymore.
Regards
Sebastian
P.S.: Couldn't find the proposed resxgen tool, maybe it is not included within .NET 2.0?
|
|
|
|
|
Hi,
so I will reply to myself because I found a solution that works for me:
1) Remove only the resx-file within the project explorer of VS
2) Then double-click to open designer
3) Change a value (for example position of a control)
4) save...
...and voilá, VS creates a new valid resx file.
So hope this helps somebody else...
Regards
Sebastian
|
|
|
|
|
Hai,
How can i retreive the network username and password of the system in c# 2005
Phanindra...
|
|
|
|
|
To get your network username, use:
WindowsPrincipal wp = new WindowsPrincipal(WindowsIdentity.GetCurrent());
Console.WriteLine(wp.Identity.Name);
To retrieve password is not easy. You can only
check whether your given password right or not.
See this : http://www.codeproject.com/useritems/User_Impersonation_in_Ne.asp
|
|
|
|
|
I have a cpp code and its header file as below.And I can export the functions DLLfun1,DLLfun2 and Add. But the problem is that although I can export DLLArg variable ( I check it with dumpbin.exe) , I can not use it from DLLClient witten in c#. I will paste my c# code also below.
Secondly, I want to ask that can I export and array such as byte [] or int [] as a variable like DLLArg.
I need help urgently.
Here DllCode.h --->
#ifdef DLLDIR_EX
#define DLLDIR __declspec(dllexport) // export DLL information
#else
#define DLLDIR __declspec(dllimport) // import DLL information
#endif
// The extern "C" declaration allows mixed languages compactability,
// it prevents the C++ compiler from using decorated (modified)
// names for the functions
extern "C" {
void DLLDIR DLLfun1(char*);
int DLLDIR DLLfun2(int);
int DLLDIR Add(int, int); // Class function Add
};
extern int DLLDIR DLLArg;
class __declspec(dllexport) DLLclass
{
public:
DLLclass(); // Class Constructor
~DLLclass(); // Class destructor
int Sub(int, int); // Class function Subtract
int Arg; // Warning: you should not
// import class variables
// since the DLL object can be dynamically unloaded.
};
Here DLLClient.cs --->
using System;
using System.Runtime.InteropServices;
using System.IO;
namespace DllClient
{
///
/// Summary description for Class1.
///
///
class Class1
{
[DllImport("main.dll")]
public extern static int parseFile(int a);
[DllImport("main.dll",EntryPoint="?deneme@@3HA")]
public extern static int deneme;
static void Main(string[] args)
{
int j= parseFile(5);
Console.WriteLine("Press any key to continue..."+deneme );
Console.ReadLine();
}
}
}
|
|
|
|
|
Couldn't you simply add a GetDllArg function that returns the value of that variable? That way, you can pinvoke it the same way as you do for the other functions.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi all,
I have a COM program written in VC++ (unmanaged). I got the managed code written in C#. My issue is I need to call the COM dll functions from my C# program.
Does any one have an idea how to do it? If so, please reply me with me some sample code.
Thanks
Sony
Sony AP
Panoor
Kerala
India
|
|
|
|
|
sony alex wrote: If so, please reply me with me some sample code.
Microsoft hides that sort of information at http://msdn.microsoft.com
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
Nice one
|
|
|
|
|
hi
i was posted how to merge 2 exe and make 1 exe but anybody can not reply me correctly . in microsoft forum post to me that i can combine them in 1 exe that when end user run 1 exe, both exe runs at the same time ..
|
|
|
|
|
You posted the same question 3 hours ago - its still on this page of the forum.
Keep it in 1 thread!
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
If the microsoft forum know how to do it, then you must ask there, not here...
|
|
|
|
|
You can't do that. You cannot combine 2 .EXE's into one an expect them both to work. It's plain old not possible...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
I'd like to make an app run from the sys tray without pressenting a form. The problem is the object goes out of scope after creation unless I use:
while(this.Created) { Application.DoEvents(); }
The class has to inheret from IDisposable so that Created can be set to false and exit the loop. I do not like using this loop as it puts the cpu usage up to 100% untill an Event occurs.
Any ideas on another approach?
-- modified at 6:43 Thursday 6th July, 2006
DOh, spelling mistakes!
|
|
|
|
|
Hello
You can make things easy for yourself by making a form and hide it using Hide() method, or making opacity = 0 in the contructor. Also don't forget to turn ShowInTaskbar property to false;
Regards
|
|
|
|
|
I hope 5 is a good vote because I'd give you 55 if I could!!
I've been screawing around with background threads and alsorts of other tricks, it's been driving me mad.
Nice one! that's brilliant!
|
|
|
|
|
Thank you!
It's really nice of you to say that.
|
|
|
|
|
Hi all
I am wondering how to protect .NET applications from being decompiled or in other word prevent it from reverse engineering
I hope of any one can help
Thx all
|
|
|
|
|
Google ".net obfuscator"
Kevin
|
|
|
|
|
thx Kevin
but I already know this technique , and I don't want to move my problem to other parity to sole it for me, I want to make my own technique in preventing .NET Code from being decompiled, and if obfuscatation is the the only way to make this protection I want to make my protection
thx again for your interest
|
|
|
|
|
ahmedsabry wrote: I want to make my own technique in preventing .NET Code from being decompiled
Go for it, and let us all know how it goes
|
|
|
|
|
Use a Dotfuscator. MSDN has some useful information on this.
Type "obfuscation" and find out
|
|
|
|
|
I have a monthcalendar control and a combo box control.
The current flow of my program is after deselecting a date, it will add a new row in a temporary DataTable.
These are the line of codes i am using:
Trow= Ttable.NewRow(); Trow[0] = this.monthCalendar1.text; Trow[1] = this.ddlType.SelectedIndex; Ttable.Rows.AddTrow
but what if the selected date already exist?
what should be done so that it will not add a new row instead update that row?
thanks a lot in advance!
|
|
|
|
|
Hello
Maybe you should try using the SELECT command to see if it will give you an existing row or not.
If the row exists => update it
else => Add a new one
Regards
|
|
|
|