|
Hi, I'm trying to have interprocess communication between two programs. The first one is written in C++ (embedded for PocketPC) and the latter in C# and .NET CE (for PocketPC). I want to use memmory mapped files for IPC.
In the C++ side I use the following API:
CreateFileMapping()
CreateMutex()
MapViewOfFile()
...
What can I do from the C# side in order to communicate properly?
Thank you,
Themis
|
|
|
|
|
Hi All,
I am trying to build an application in VS.Net which uses Crystal Report 11 to build the rpt file. I have an XML and XSD file as my datasources. I want to view the report in PDF format. Now my source code looks like:
ReportDocument doc = new ReportDocument();
string fileName = Server.MapPath("MyReport.rpt");
doc.Load(fileName);
DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath("MyXML.xml"));
doc.SetDataSource(ds);
ExportOptions exportOpts = doc.ExportOptions;
exportOpts.ExportFormatType = ExportFormatType.PortableDocFormat;
exportOpts.ExportDestinationType = ExportDestinationType.DiskFile;
exportOpts.DestinationOptions = new DiskFileDestinationOptions();
DiskFileDestinationOptions diskOpts = new DiskFileDestinationOptions();
((DiskFileDestinationOptions)doc.ExportOptions.DestinationOptions).DiskFileName = Server.MapPath("MyPDF.pdf");
doc.Export();
But it gives me the error
"Query Engine Error: 'c:\inetpub\wwwroot\MyWebsite\MyReport.rpt'"
I tried out all the forums but could not find any solution. Someone told me that it is due to xsd file error. But in Crystal Report it is running perfectly OK. Can anyone help.
|
|
|
|
|
I'm getting a weird problem while reading the standard output from a process I've created while its running. The console output from the process is A, B, C, D, E but for some reason I am getting the output from standard out as A, B, C, E, D. Has anyone encountered this before?
I'm using a separate thread to read standard out and push the results to a Queue which is then read by the main application and displayed in a text window.
Writing to the Queue in the thread:
ConsoleLine = null;
while( (ConsoleLine MyProcess.StandardOutput.ReadLine()) != null )
{
ConsoleLine += System.Environment.NewLine;
lock( m_OutputQueue.SyncRoot )
{
m_OutputQueue.Enqueue( ConsoleLine );
}
ConsoleLine = null;
}
Reading from the Queue and updating application:
do
{
while( (StdStreamReader.m_OutputQueue.Count>0) && (i<5) )
{
// get output from queue
ConsoleLine = StdStreamReader.m_OutputQueue.Dequeue() as string;
//process output
if( globals.ProcessBuildOutput( ConsoleLine ) )
{
bErrors = true;
}
i++;
}
// let the app do some housekeeping
Application.DoEvents();
//Give the process some room to breath
System.Threading.Thread.Sleep( 100 );
}while( !MyProcess.HasExited );
|
|
|
|
|
Holla.
I have a little question here:
How to I pipe a processes standard input or output somewhere else?
I mean: I want to run a Console App as a process. This, of course, means that I dont want the console to display (if I wanted that, I would use Process.Start("cmd.exe","/C ConsApp.exe").
However, I have some difficultied rerouting the StandardOutput to a richTextBox.
How do I do this - it always tells me that StandardOut is read-only?!
Cheers
Sid
P.S.: Tired and confused
|
|
|
|
|
And YES, I did use a Stream. I just thought that seeing some basically working code might help?
Could you post some example code which outputs the result of "type text.txt" to a textbox, so I can see some complete code?
Cheers
Sid
P.S.: process' and difficulties. Consider my prior post corrected
|
|
|
|
|
How to obtain the server name of the one machine or the office land online SQL SERVER2000?
|
|
|
|
|
The problem has been solved with sqldmo
but How to get the password of sa user of Sql Server2000?
|
|
|
|
|
I need code to verify email in win form, help!
|
|
|
|
|
You'll have to be alot more specific about what you want. Verify an email? I take that to mean "does it conform to the RFC specification". Or are you trying to verify an email address is in the correct format? Are you trying to find out if the email address even exists? (Can't be done BTW...)
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I would like to verify an email address as if it is in the correct format, can you help?
|
|
|
|
|
Simple. You can use a Regular Expression to check the format and legal characters.
See my last post on this here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i using matlab in calcul power system i don't know how convert matlab file exe or m file in c# to using gui in c#. and how c# acess to m file in matlab.
|
|
|
|
|
How could I order "categories" in the propertygrid according to my will?
|
|
|
|
|
Depends...
if it is your own properties use the Category attribute:
[Category("MyCategory")]
public int MyInt
{
get{...}
set{...}
}
if you whant to change category on derived properties, u have to override the properties and do as above, but alas not all properties can be overridden.
-spif2001
|
|
|
|
|
I believe I saw (on Google somewhere) that adding multiple \t 's before the category name allows you to change the order.
Never tried it though
|
|
|
|
|
Thanks a lot for your message!
But my question was about ordering of "categories" for propertygrid representation.
I know how to use this attribute.
|
|
|
|
|
I want to add a column to my data grid for a treeview structure; where every cell in the column would be a TreeNode object. I wrote a class DataGridTreeNodeColumn that overrides DataGridColumnStyle but you can't just draw a single TreeNode. You have to add the TreeNode to the TreeView and use the TreeView to draw it.
Is it even possible to put a treeview inside a datagrid using this method? Is there another way of doing it? Are there any tutorials that explain how to do this? Thanks in advance.
|
|
|
|
|
Hi
Is there a event which fires when any text gets in to the textbox, either i type or copy paste. I know its possible in keypress and mousedown events but i want a single event where i can identify when a text gets into a textbox. plz do reply if its possible or not.
Cheers!
Cheetu
|
|
|
|
|
|
Hi everyone,
I am just wondering how I can start/restart SQL Server 2000 instance or MSDE programmatically through C#? Does Microsoft have those built-in API?
Cheers!
|
|
|
|
|
|
How can I define a struct like this in C/C++
struct XXX
{
byte b[5];
}
I did it like this
struct XXX
{
byte[5] b; // compile error CS0650
}
another question: how to get component offset in the structure. like in C
int offset = offset(XXX.b);
|
|
|
|
|
You're in the C# forum, you need the C++ forum.
A struct is just a class that defaults to public access ( unlike in C# ). Did byte b[5] cause an error ? My C++ is too rusty for me to answer without checking, but the C++ forum has lots of people who can help.
BTW, a struct is just a class with default access of public. In C#, it's a whole different story.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I'm sorry. I think I should clarify my question. My question is about C#, I want to define a byte array in a structure ( a user defined data type ). This can be easily done in C/C++ like
struct abc
{
byte b[5];
}
My question is may I define a structure in C#, which contains a byte array? similar to about example.
Thank u for your input.
|
|
|
|
|
public struct XXX
{
byte [] xx;
}
Your problem is that a struct cannot have a parameterless constructor, so you can only provide constructors that set this value by passing it in. However, you CAN add a property, which could be:
byte [] xx
{
set
{
System.Diagnostics.Debug.Assert(value.Length <= 5, "XXX.xx must be an array of 5 bytes or less");
etc.
Or you could be nice and just copy the first 5 bytes of a larger array, it depends what the struct value really is, and what is valid behaviour for your situation. Half a comment may be OK, half an IP address probably isn't.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|