|
Hi and thank you for your answer.
Yes, your are right, for me it doesn't matter.
It is mattering for the other system that am communicating with.
I was only trying to check if there was a reason for that or if I could do something about it.
Best regards for all.
|
|
|
|
|
so you have to write your xml output manually
dhaim
program is hobby that make some money as side effect
|
|
|
|
|
H@is@here wrote: It is mattering for the other system that am communicating with.
Not to sound flippant, but it shouldn't matter to the other system as well. The fact that it does probably means that they aren't using an XML parser to read the XML and are doing all of the parsing by hand. This is wrong on so many different levels. They should rethink how they are doing the XML parsing and use an actual parser so they don't have that problem.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
Scott Dorman wrote: Not to sound flippant
Not at all, it is a old system, and probably they are processing the xml manually.
Thanks again.
|
|
|
|
|
User can add new row to Winforms DataGridView by pressing Ctrl+down arrow.
How to initialize some new row values from current row ?
How to get last row number which was current if Ctrl+Down arrow key was
pressed ?
Andrus
|
|
|
|
|
Whenever scope goes to new row then RowEnter event fired.
Probably this event will help you.
Parwej Ahamad
R & D: REST services with WCF
|
|
|
|
|
Whenever I wana use XPExplorerBar.dll in my projects, I have this problem. When I press F5, the project returns to code editor and a window alerts me this:
A call to PInvoke function 'XPExplorerBar! XPExplorerBar NativeMethods:: LoadBitmap' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.
[DllImport("User32.dll")]
public static extern IntPtr LoadBitmap(IntPtr hInstance, long lpBitmapName);
and must be changed to this :
DllImport("User32.dll")]
public static extern IntPtr LoadBitmap(IntPtr hInstance, int lpBitmapName);
But I don't know, code demo?
|
|
|
|
|
No need to post three times.
If you want to add or change something, either modify your original message (use the Edit button),
or add a new message to the same thread.
|
|
|
|
|
Whenever I wana use XPExplorerBar.dll in my projects, I have this problem. When I press F5, the project returns to code editor and a window alerts me this:
A call to PInvoke function 'XPExplorerBar! XPExplorerBar NativeMethods:: LoadBitmap' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.
[DllImport("User32.dll")]
public static extern IntPtr LoadBitmap(IntPtr hInstance, long lpBitmapName);
and must be changed to this :
DllImport("User32.dll")]
public static extern IntPtr LoadBitmap(IntPtr hInstance, int lpBitmapName);
But I don't know
|
|
|
|
|
Whenever I wana use XPExplorerBar.dll in my projects, I have this problem. When I press F5, the project returns to code editor and a window alerts me this:
A call to PInvoke function 'XPExplorerBar! XPExplorerBar NativeMethods:: LoadBitmap' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.
[DllImport("User32.dll")]
public static extern IntPtr LoadBitmap(IntPtr hInstance, long lpBitmapName);
and must be changed to this :
DllImport("User32.dll")]
public static extern IntPtr LoadBitmap(IntPtr hInstance, int lpBitmapName);
But I don't kwon
|
|
|
|
|
|
Actually, it works if the long is changed to an int. (C++ long == C# int).
I'm not sure why it works with this modification, since it does appear the unmanaged method takes a string, not an int.
*edit* Ah, according to MSDN,
Alternatively, this parameter can consist of the resource identifier in the low-order word and zero in the high-order word. The <a id="ctl00_rs1_mainContentContainer_ctl03" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00|ctl00_rs1_mainContentContainer_ctl03',this);" href="http://msdn.microsoft.com/en-us/library/ms648029%28VS.85%29.aspx">MAKEINTRESOURCE</a> macro can be used to create this value. That's why passing in an int will work.
Life, family, faith: Give me a visit.
From my latest post: "We are Christian, resistance is futile. Your Jewish traits will be assimilated into the Church collective."
Judah Himango
|
|
|
|
|
Wow.
Strictly speaking, this still seems incorrect. If what gets passed is a pointer, it should take
4 or 8 bytes depending on Win32/Win64. So when not a string, then an IntPtr should be used,
don't you think?
|
|
|
|
|
Yeah, if it's taking a pointer, then yes, an IntPtr should be used rather than an int.
However, while I'm not privvy on all the unmanaged lingo, it's not clear from the documentation that it is a pointer. It seems the integer is simply an identifier of a resource, not a pointer to an integer.
modified on Friday, July 18, 2008 1:51 PM
|
|
|
|
|
This was discussed and fixed[^] in the comments to the XPExplorerBar article.
Life, family, faith: Give me a visit.
From my latest post: "We are Christian, resistance is futile. Your Jewish traits will be assimilated into the Church collective."
Judah Himango
|
|
|
|
|
Hi All,
Newbie question!!!
Is it possible to have a web interface for a c# Windows application??
Basically this is what i would want to do. I have a Windows application program which runs 24/7 and collects data from the TCP IP layer and stores it in a database. Its a windows application witha form for the administrator to do the initial configuration and monitoring.
All the data that is collected now needs to be shown on a web page, as a status report with graphs and stuff. Also the web page should be able to send data to the application , which inturn will send TCP IP data .
How do I proceed with this??
Any help will be appreciated.
Best Regards.
|
|
|
|
|
Preetham.N wrote: Newbie
You should really try simpler problems until you become more experienced.
Preetham.N wrote: a web interface for a c# Windows application?
Study the WebBrowser class....
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Sorry, it sounds like you have a windows application that does one thing and now you want another (web) application to use for reporting - correct?
Then yes - I'm guessing you just have a database in the background, it should be simple?
|
|
|
|
|
WinForms .NET 3.5 application creates files using UserSettings.Store
object.
UserSettings.RemoveAll() does not remove those files.
Directory
C:\Users\user\AppData\Local\IsolatedStorage\kpfhj5go.0xp\drvowkmz.al1\Url.uxurxejkalg3optycd32sijndoeqvbiy\Url.4d3tujmqjjalo23wq4rjcu1tkcry2s2d\Files
still contains created files.
How to remove all files in code from isolated storage ?
Andrus.
public static class UserSettings
{
static IsolatedStorageFile Store
{
get
{
return IsolatedStorageFile.GetUserStoreForDomain();
}
}
public static void RemoveAll()
{
Store.Remove();
IsolatedStorageFile.Remove(IsolatedStorageScope.Domain);
IsolatedStorageFile.Remove(IsolatedStorageScope.Machine);
IsolatedStorageFile.Remove(IsolatedStorageScope.Assembly);
IsolatedStorageFile.Remove(IsolatedStorageScope.Application);
}
}
Andrus
|
|
|
|
|
When you change the font size for a control in Visual Studio, you can often see that VS seems to know better; e.g. you select Arial 10, and when you look at the property window afterwards, it has changed to 10.2.
My experience with a little proportional resizing tool I wrote in C# seems to imply that this happens at runtime as well, which causes problems when labels are to close to each other (they may overlap when I have computed their positions based on font size 10 but really they autosize to 10.2).
Does anybody know how I can determine at runtime with which font size a text is actually being rendered? And what the reason for all this is anyway?
Graphics isn't exactly my strong point, and I'm running out of ideas for search criteria to find something related.
|
|
|
|
|
Hey everybody!
Lets assume the following function signature:
void do_something(byte* input, byte* output);
The function is taking the input, doing something with it and places the result in output.
The function uses "new byte(X)" command, and returns this new byte* (in other words, the caller must delete the variable when done).
Now, We're putting this function in COM, and calling it from C#.
So, in C++ we're using "new", and it returns to C#.
Does c# take care of the assigned memory in this scenario ???
Thanks a lot in advance!!!
|
|
|
|
|
As the memory is not allocated from the managed memory, it's not garbage collected. The calling code will have to delete the memory.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
|
Green Fuze wrote: Does c# take care of the assigned memory in this scenario ???
Nope. See, for instance, here [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|