|
I've found solution!
To execute C# code with Web Reference to web-service you must digitally sign your Infopath form. It can be done through
Tools -> Form Options - Security:
1. Uncheck Automatically... and select full trust
2. Check sign and create certificate
3. Publish the form
or you should create a msi project to install your Infopath form.
find out more...
xedom developers team
personal web page
|
|
|
|
|
hi
how to Update database with datarow in visual studio 2005 ? when i following steps in vs.2003 the dataset updated but database don't updated .how to do that ????
|
|
|
|
|
System.Data.OleDb.OleDbCommandBuilder command_builder = new System.Data.OleDb.OleDbCommandBuilder(da);
da.Update(dataset);
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
hi all,
i face in my control list.ascx in below td tag background img file
parth is fix, that control is save in ucontrol diactory,
Thet problem is when i call from home page (that is out off folder)
the background img is not display.
thank...
Help!i
|
|
|
|
|
the variables in MC++ "out of scope" when my C# code subclass the MC++ abstract class.
------------
C++ abstract class:
public __gc __abstract class PWiDSForm
{
public:
virtual void NotifyViewHandler(String* funcName, int node, UInt32 LC) = 0;
};
---------------
C# subclass:
public class FormDelegate : WiDSAddinView.PWiDSForm
{
WiDSForm wf;
public FormDelegate(WiDSForm wf)
{
this.wf = wf;
}
public override void NotifyViewHandler(string funcName, int node, uint LC)
{
wf.WiDSEventStackLV_GotoFunction2(funcName,node,LC);
}
}
_____________________
//#program managed
DWORD WINAPI ViewProc(LPVOID lpParameter){
FILE *fp; //just define here
char **temp;
char name[512];
Py_Initialize();
temp = (char **)malloc(sizeof(char *));
*temp = (char *)malloc(20);
strcpy(*temp,"hello");
PySys_SetArgv(1, temp);
if(!Py_IsInitialized())
{
printf("can't init python");
return 0;
}
Py_InitModule("WiDSAddin",WiDSAddinMethods);
sprintf(name,"%s%s", Path,"WiDSAddinView.py");
fp = fopen(name, "r");//----------"out of scope at runtime"
PyRun_SimpleFile(fp, name);
Py_Finalize();
View::WiDSViewHandle = NULL;
return NULL;
}
but if I remove the class inherit, the programs works fine.
What is the problem?
Thanks in advance.
|
|
|
|
|
regasm "$(OutDir)\$(TargetFileName)" /tlb:"$(OutDir)\$(TargetName).tlb"
solve the problem.
|
|
|
|
|
Hi every body
I need Implementation of cristian clock syncronization (distributed OS) immediately.
any one can help me Please?
Tanx A Lot
Soozan
-- modified at 10:00 Friday 10th February, 2006
|
|
|
|
|
|
I think you're going to have to Google this one yourself. You might even end up coding it yourself too. I don't think you're going to find a "wrapped box" solution you can just "plugin" to your code.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi
i want to encrypt exe file in hard . when user can click my program the exe file decrypt on the fly and run (when it's decrypting it's running) ????
|
|
|
|
|
And what is the exact problem you are experiencing?
|
|
|
|
|
I think he wants to know how he can encrypt the exe file and then automatically decrypt it after a click and start the programm.
Well I don't know how to encrypt/decrypt but I know how you can compile it to native code (look for .Net Reactor).
Greetings,
Ingo
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
You can't encrypt an .EXE and have it decrpyt itself when launched. If you encrypt the entire .EXE, it's no longer a valid image and won't launch. You have to have some kind of wrapper around the .EXE, kind of like how WinZip wraps a .ZIP file with a self-extractor module. This wrapper code would have to decrypt the wrapped .EXE into memory, essentially replacing the Loader built into Windows (Good Luck with that!). Decrpyting the .EXE to a file and launching that would render your protection useless in about 5 seconds while the user quickly copies the new .EXE file to another location!
While on the surface this sounds like a good idea, it's also your protection scheme's achilles heel. There nothing you can do to stop someone from using your own security wrapper to decode the .EXE, save it to a file, and then just use and distribute the decrypted version.
In every copy protection scheme so far, the protection scheme can be defeated simply because of it's own existance! Every protection scheme gives itself away because it has to run in a machine where anyone can attach a debugger to it and watch it run to see what it's doing. With the information gleened from the debugger, it's simply a short matter of time before the protection is defeated. Usually using the protection code against itself to "delivery the goods".
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi, I have a small dos program that compiles txt files. The dos program checks the text file, and if there's an error or if the text is ok it sends a message to the dos prompt. I would like to capture this message and display it in a textbox. I have already tried with the code below, but i don't get the output from the text compler program, but I do get some DOS output like the path the program is in etc. Does anybody know how to solve this problem????
System.Diagnostics.Process p2 = new System.Diagnostics.Process();
StreamWriter sw2;
StreamReader sr2;
StreamReader err2;
System.Diagnostics.ProcessStartInfo psI2 = new System.Diagnostics.ProcessStartInfo("POINT");
psI2.UseShellExecute = false;
psI2.RedirectStandardInput = true;
psI2.RedirectStandardOutput = true;
psI2.RedirectStandardError = true;
psI2.CreateNoWindow = true;
psI2.Arguments = "/K" + compileTextFile;
p2.StartInfo = psI2;
p2.Start();
sw2 = p2.StandardInput;
sr2 = p2.StandardOutput;
err2 = p2.StandardError;
textBox1.Text = sr2;
Thanks!
|
|
|
|
|
TheNewNewGuy wrote: p2.Start();
Try adding p2.WaitForExit() after starting it
|
|
|
|
|
You have to read the StandardOut stream to get anything to show. TextBox.Text won't read it for you:
Do While sr2.Peek > -1
TextBox1.Text.Append sr2.ReadLine()& Environment.NewLine
Loop
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Can you show me how to that in c#. I'm really new at this, as you may have notised
Thanks for the help..
-- modified at 9:13 Saturday 11th February, 2006
|
|
|
|
|
Sorry, I forgot what forum I was in...
p2.Start();
sw2 = p2.StandardInput;
sr2 = p2.StandardOutput;
err2 = p2.StandardError;
while (sr2.Peek > -1)
{
TextBox1.Text += sr2.ReadLine() + Environment.NewLine;
}
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 9:32 Saturday 11th February, 2006
|
|
|
|
|
Whem i compile the code you suggest i use, I get this error:
Cannot convert method group 'Peek' to non-delegate type 'bool'. Did you intend to invoke the method? The code looks like this:
System.Diagnostics.Process p2 = new System.Diagnostics.Process();
StreamWriter sw2;
StreamReader sr2;
StreamReader err2;
System.Diagnostics.ProcessStartInfo psI2 = new System.Diagnostics.ProcessStartInfo("POINT");
psI2.UseShellExecute = false;
psI2.RedirectStandardInput = true;
psI2.RedirectStandardOutput = true;
psI2.RedirectStandardError = true;
psI2.CreateNoWindow = true;
psI2.Arguments = "/K" + compilePon;
p2.StartInfo = psI2;
p2.Start();
sw2 = p2.StandardInput;
sr2 = p2.StandardOutput;
err2 = p2.StandardError;
while (sr2.Peek < -1)
{
textBox3.Text += sr2.ReadLine() + Environment.NewLine;
}
sw2.AutoFlush = true;
p2.WaitForExit();
sw2.Close();
}
|
|
|
|
|
Well, I see two mistakes. The sign in the while statement is backwards and there are no parenthesis after the Peek call. All method calls in C# require parenthesis after the method name, evem if you're not passing in any parameters:
p2.Start();
sw2 = p2.StandardInput;
sr2 = p2.StandardOutput;
err2 = p2.StandardError;
while (sr2.Peek() > -1)
{
textBox3.Text += sr2.ReadLine() + Environment.NewLine;
}
I see I left the parenthesis out of the C# code I posted. That's what I get for converting code by hand!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 8:17 Sunday 12th February, 2006
|
|
|
|
|
I have a custom object that inherits from CollectionBase and it does not successfully bind to GridViews or DropdownLists. My understanding is that that is because GridViews and Dropdownlists implement IEnumerable, therefore, if I want my custom object to bind to the gridview or the dropdownlist, I need to inherit from IEnumerable also, right?
Whatever the answer is, I'm trying to learn what I need to do to get my custom object to bind to a gridview and a dropdownlist.
I don't think this has anything to do with it, but I'm setting the value of a Profile object (ASP.NET 2.0) equal to the custom object.
School.Teachers tlTeachers = new School.Teachers();
tlTeachers.Add(new School.Teacher("Buck"));
Profile.Teachers = tlTeachers;
Code like this works:
Label1.Text = Profile.Teachers.Count.ToString(); // The number of items in the profile object
Label1.Text = Profile.Teachers[1].FirstName.ToString();// The value of an item at a particular index position
But this does not:
GridView1.DataSource = Profile["Teachers"]; // Populate the GridView1 from the Profile Object
GridView1.DataBind();
|
|
|
|
|
Hi,
When there is key down event, the selecteditem of the treeview will change to the first treenode with the text starts with the key pressed.
Does anyone know how to disable this function?
Thanks.
coby
..
|
|
|
|
|
Do something like this:
private void treeView1_KeyDown(object sender, KeyEventArgs e)
{
e.SuppressKeyPress = true;
} This does not interfere with editing the label for nodes.
|
|
|
|
|
Thanks.
There is no such property of KeyEventArgs for C#'s KeyDown. Could you please explain to me more?
|
|
|
|
|
There is in .net 2.0.
What is the proper argument for KeyDown in .net 1?
|
|
|
|