|
You have to decorate these strings in your .net interop interface/class/struct with a MarshalAs(UnmanagedType.BStr) attribute.
|
|
|
|
|
Tried adding MarshalAs attribute. It didnt make any difference.
Here is the code I am using..
public bool CreateFile([MarshalAs(UnmanagedType.BStr)]string file,string app)
{
FileStream fileStream = new FileStream(file,FileMode.OpenOrCreate);
/* write some stuff in the file here*/
}
Unfortunately, it is not creating a proper filename if the string is unicode.
The above function works correctly if I execute it directly from .NET(without MarshalAs attribut)
Any suggestion is welcome..This has me stumped for over a week now.
Thanks
Ashish Iddya
|
|
|
|
|
Dear all
I am developing a search engine by C#, and I have problem with searching for words in file content
I do not know how to code, what is the technique
Please let me know if you have any idea or suggestion
Appreciate yours co-operation
|
|
|
|
|
truongminhdao wrote: I do not know how to code, what is the technique
WHat is the problem you are having? What code do you have already?
|
|
|
|
|
How can I search for word in file content in .pdf,.doc,.xsl format??
That's my problem
I have not write any code for this application yet and still researching about that
Please let me know if you have any sugesstion or open source
Appreciate your co-operation
For my love
|
|
|
|
|
Hi everybody!
I'm using the MS web browser control to host an HTML for use as HTML Editor.
I have to make additional changes to the HTML content before saving to document, so that I want my own save function. But I dont know how to mark the document status as saved, changed...so that it wont display prompt dialog when I close or navigate to another page.
All I want is to be able to get/set the status of the document MANUALLY.
can anyone help?
many thanks!
What U PAY is what U GET!!!
|
|
|
|
|
Hi,
I am using Mnemonic with label controls. I have set UseMnemonic true. In design time underline character appears but in runtime , underline character appears only after pressing Alt key not before that. What I am missing?
Any clue?
Regards,
Rajeev
|
|
|
|
|
Isn't that the normal behaviour. With the exception of Office applications, everything else on my PC only shows the underline when the alt key is pressed. (Office applications, if you didn't already know, are developed using their own GUI toolkits separate from Windows - normally they are a little ahead of the curve, but when the Windows GUI catches up it does things a little differently)
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Its a windows setting. Look under display properties, appearance, effects, last option, untick that
|
|
|
|
|
Thanks Man,
It works...
Regards,
Rajeev
|
|
|
|
|
Hi
I am using Collection Editor in my Property Grid.When I change value of
a property in the property grid, the PropertyValueChanged event is
raised and and I am able to execute certain lines of code over
there.But in case of Collection Editor, this event is not raised and so
I am not able to reflect the changes into my code Can anyone suggest me
the reason and a possible workaround for this problem ???
|
|
|
|
|
Hi Shrivastava,
Guess the following site will help you.
http://www.codeproject.com/vb/net/CollectionEditorVB.asp
Thanks and Regards
Kodandapani.M
|
|
|
|
|
hi,
I have an application developed in MFC( VC++ 6.0 ) where the information all the parameters of CreateFont function of CFont is stored in a file. Now I am rewriting the whole application in c#. But I am not able to map all the paramters of CreateFont to the Font class of c# and to provide backward compatibility it is important. Can anyone suggest me a possible workaround for this problem ????
|
|
|
|
|
Tulika Shrivastava wrote: Can anyone suggest me a possible workaround for this problem
It would be helpful to understand the format of the file.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
hi,
The information about the font is stored in the follwing format:
1. LoByte (Point size for Font)
2. LoByte (Point size for Font)
3. LoByte(LoWord(Height))
4. HiByte(LoWord(Height))
5. LoByte(HiWord(Height))
6. HiByte(HiWord(Height))
7. LoByte(LoWord(Width))
8. HiByte(LoWord(Width))
9. LoByte(HiWord(Width))
10. HiByte(HiWord(Width))
11. LoByte(LoWord(Escapement))
12. HiByte(LoWord(Escapement))
13. LoByte(HiWord(Escapement))
14. HiByte(HiWord(Escapement))
15. LoByte(LoWord(Orientation))
16. HiByte(LoWord(Orientation))
17. LoByte(HiWord(Orientation))
18. HiByte(HiWord(Orientation))
19. LoByte(LoWord(Weight))
20. HiByte(LoWord(Weight))
21. LoByte(HiWord(Weight))
22. HiByte(HiWord(Weight))
23. Italic(byte)
24. Underline(byte)
25. StrikeOut(byte)
26. CharSet(byte)
27. OutPrecision(byte)
28. ClipPrecision(byte)
29. Quality (byte)
30. PitchAndFamily(byte)
31. Length of face name (L)
For Length L following 2 bytes will be repeated
1. LoByte (character of face name)
2. HiByte (character of face name)
Here the first inforation i.e.Point size for Font is the value which we get from the
CFontDialog::GetSize()
function and the rest of the information are the the parameters of the CFont::CreateFont( int nHeight, int nWidth, int nEscapement, int nOrientation, int nWeight, BYTE bItalic, BYTE bUnderline, BYTE cStrikeOut, BYTE nCharSet, BYTE nOutPrecision, BYTE nClipPrecision, BYTE nQuality, BYTE nPitchAndFamily, LPCTSTR lpszFacename ).
I am not able to map all these parameters to their corresponding c# values and thus cant open the application developed using the previous version( MFC ) and see the fonts properly.Any suggetions???
-- modified at 4:33 Monday 13th February, 2006
|
|
|
|
|
Hello,
I'm trying to display data from a text file "TAB" into a data set for display in the windows form. Later , I need to update any changes that the user made to the text file. Anyone knows how to do this?
I'm using C#
-- modified at 1:40 Monday 13th February, 2006
|
|
|
|
|
how u r expecting a table in a text file... in text files u can't create tables, if u want to do that means seperate the texts with seperators and then get the string from that text file do the operations
VMSSanthosh
|
|
|
|
|
Hii,,
i need to identify all the systems connected in a lan..How can i do it? and if my lan contains multiple domains then how can i find the domains programatically and find the systems under that domain??PLease help
|
|
|
|
|
Hi,
I hope you can manipulate the follwing code and get information about the Domains
using System;
using System.Net;
class GetResolveInfo
{
public static void Main(string[] argv)
{
if (argv.Length != 1)
{
Console.WriteLine("Usage: GetResolveInfo address");
return;
}
IPHostEntry iphe = Dns.Resolve(argv[0]);
Console.WriteLine("Information for {0}", argv[0]);
Console.WriteLine("Host name: {0}", iphe.HostName);
foreach(string alias in iphe.Aliases)
{
Console.WriteLine("Alias: {0}", alias);
}
foreach(IPAddress address in iphe.AddressList)
{
Console.WriteLine("Address: {0}",
address.ToString());
}
}
}
Hope this will help you
kss
|
|
|
|
|
thanks for the reply..But here i have to give the domain name externally.what i need is my program has to find all the domains in the lan.thanks in adv
|
|
|
|
|
hi,
I am working on VS 2003.I have developed an window application.
I want to know how the application can be run in
1.GUI Mode
2.CommandLine Mode -In which the application should prompt
for the input from the user.
Thanks and Regards
vinutha kempanna
|
|
|
|
|
On the class where your start up form is there is a static method called Main() . It kicks off the GUI. You need to make a descision here whether to launch the GUI or go command line. The parameters passed into the Main method are the command line parameters. If there are none then you can launch the GUI. If there are parameters then you could process them and exit.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
I'm trying to return an Ampersand as a char using this code:
<br />
case 17:<br />
return '&';<br />
However, it doesn't return anything. So I tried using the unicode escape: \u0026. That didn't return anything either.
I've changed the fonts multiple times, but for some reason the ampersand just doesn't show up. Does anyone have a solution?
|
|
|
|
|
Paradox22 wrote: it doesn't return anything.
- What is "it" in the above phrase?
- What happens when you set a breakpoint at the return statement? Is it ever reached?
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
hi
u try
{
case 17:
return '\&';
}
|
|
|
|