|
Hi all:
I'm developing Smart phone demo project, but I encounter some problem as follow:
The compiler complains about the following code, for
" Error 1 error LNK2019: unresolved external symbol lstrlenA referenced in
function "wchar_t * __cdecl _com_util::ConvertStringToBSTR(char const
*)"
"
But I don't know how to fix it!
int COlog::CreateXml(char* strFileName, char* strTime, char* strRes)
{
char m_szPath[MAX_PATH];
MSXML::IXMLDOMElementPtr Root;
Root = m_pDoc->createElement("RunInfo");
m_pDoc->appendChild(Root);
MSXML::IXMLDOMElementPtr Res;
Res = m_pDoc->createElement("Result");
Root->appendChild(Res);
Res->Puttext(strRes);
MSXML::IXMLDOMElementPtr Time;
Time = m_pDoc->createElement("Begin");
Root->appendChild(Time);
Time->Puttext(strTime);
_snprintf( m_szPath, sizeof(m_szPath), "%s.XML", strFileName);
_variant_t varString = (m_szPath);
m_pDoc->save(_bstr_t(strFileName));
return 1;
}
|
|
|
|
|
Hi All,
From my system, I want to stop / start the IIS of different machine and that machine may be on different domain. I have written the following code, it works for my system and it does not work for othe system. It would be great help if you can give some idea.
private bool IISReset(bool start, string machineName)
{
string arguments = string.Empty;
if (start == true) arguments = machineName + " /start";
else arguments = machineName + " /stop";
try
{
//setting the password
System.Security.SecureString pw = new System.Security.SecureString();
char ch1 = 'm';
pw.AppendChar(ch1);
ch1 = 'd';
pw.AppendChar(ch1);
ch1 = 'm';
pw.AppendChar(ch1);
ch1 = 'f';
pw.AppendChar(ch1);
ch1 = 't';
pw.AppendChar(ch1);
ch1 = '@';
pw.AppendChar(ch1);
ch1 = '1';
pw.AppendChar(ch1);
ch1 = '2';
pw.AppendChar(ch1);
ch1 = '3';
pw.AppendChar(ch1);
string domain = "MyDomain";
Process process = Process.Start("iisreset", arguments, "maaz", pw, domain);
process.WaitForExit();
return true;
}
catch (System.Exception ex)
{
return false;
}
}
Vishal Modi
|
|
|
|
|
How can you stop other machine's IIS? This is not possible unless until you are able to run this code on the desired machine.
|
|
|
|
|
IISReset command supports to stop/start the IIS which is running on other system. We have tried it on the same network, but there is some problem when we tried to stop/start IIS on different domain.
It is our project requirement, we have to upload some files and before that we have to stop that IIS.
Vishal Modi
|
|
|
|
|
i have already added a simple menubar to my project now i need to make its look & feel good so i wanted to put ultratoolbar into my project .can u please tell me how to add an exisiting simple mainmenu to a ultra menubar manager.i need to write the code in c# so please tell me the appropriated command for inserting mainmenu into ultramenubar
its urgent please help
thanks and regards
vasudevan
|
|
|
|
|
Does anyone here happen to know of any code that will shorten a path stored in a string?
I have found tons of examples using a StringFormatter that all seem to be centered around drawing the the text using GDI+ but I am not interested in that right now. I don't want to roll my own label control at this point, just try to put a long path into one
I will have to build one myself I guess...
(unless some nice person happens to know where one is by the time I get home )
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
My Blog[^]
|
|
|
|
|
Hello,
I've written a reflection app. When I run it on some machines it issues a method invocation error. After some checking I've discovered that the problem is that the Windows EventLog is "full."
But I don't care about the event log and I have zero code that refers to it. How do I tell my app to disregard the eventlog? Is there a global setting somewhere?
Thanks in advance!
PhrankBooth
|
|
|
|
|
|
PhrankBooth wrote: After some checking I've discovered that the problem is that the Windows EventLog is "full."
Where did you find this little tidbit of information?
All you can do is change the Event Log properties in EventVwr. I don't have any problems with each event log set to "Overwrite events as needed" with a 1024 maximum size for each log.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all,
I have a "Managed Extensions" assembly written in VC++ (Visual Studio 2003 - VS7) that so far was build for .Net framework 1.1 customers.
Since all the other assemblies developers in my project already moved to Visual Studio 2005 (VS8) with .Net framework 2.0 , and they want to reference my assembly as "project reference", I have to upgrade the prj file for Visual Studio 2005.
On the other hand, I need that my assembly will be able to be referenced as "dll reference" for VS7 developers, and will be able to run for .Net framework 1.1 customers.
In the following URL I found the answer for regular (c#) assemblies: http://weblogs.asp.net/israelio/archive/2005/06/08/410811.aspx
Any ideas?
Thanks a lot!
Adi
|
|
|
|
|
i think you need to specify the minimum .NET version 1.1 in the <assemblyname>.config file
but still use vs2003 to compile it.
|
|
|
|
|
Hi!
I want to draw a Map for a Webgame (C#, VWD 2005 EE). I draw Lands, units...
But unfortunatly the borders of the String are not "clearly", good, drawn, as you can see at the link of the german csharp forum. There is a picture where you can see what I mean.
http://www.mycsharp.de/wbb2/thread.php?threadid=13557[^]
So I create the Graphics Device.
G_WorldMap = new Bitmap(3500, 2000, PixelFormat.Format32bppArgb);<br />
Graphics newBmpGraphics = Graphics.FromImage(G_WorldMap);<br />
So I draw the strings
foreach (Land land in G_Game.Lands.LandsAL)<br />
{<br />
Font font = new Font("Comic Sans MS", 10);<br />
SizeF stringSize = newBmpGraphics.MeasureString(land.Name, font);<br />
newBmpGraphics.DrawString(land.Name, font, new SolidBrush(Color.Black),<br />
new Point(land.CenterX - (int)(stringSize.Width / 2), land.CenterY - (int)(stringSize.Height / 2)));<br />
<br />
font = new Font("Courier", 12, FontStyle.Bold);<br />
stringSize = newBmpGraphics.MeasureString(land.Id.ToString(), font);<br />
<br />
newBmpGraphics.DrawString(land.Id.ToString(), font, new SolidBrush(Color.Black),<br />
new Point(land.CenterX - (int)(stringSize.Width / 2),<br />
3 + (int)stringSize.Height + land.CenterY - (int)(stringSize.Height / 2)));<br />
}<br />
Any ideas ?
lg ifoko
|
|
|
|
|
Set the graphics objects quality settings before drawing to it: (I used G where you have newBmpGraphics)
Graphics G = Graphics.FromImage(bmp);<br />
G.PageUnit = GraphicsUnit.Pixel;<br />
G.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;<br />
G.CompositingQuality = CompositingQuality.HighQuality;<br />
G.CompositingMode = CompositingMode.SourceCopy;<br />
G.TextRenderingHint = TextRenderingHint.SingleBitPerPixelGridFit;<br />
G.InterpolationMode = InterpolationMode.High;
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
|
|
|
|
|
Thx a lot, it is better now.
There is some "interpolation" at borders from the strings and the polygons, which I want to turn off complete.
A new picture is at http://www.mycsharp.de/wbb2/thread.php?postid=72430#post72430[^]
Do you have a link where I can read (good explained) what setting has which effects ? Example ?
lg ifoko
|
|
|
|
|
Best I can suggest is to refer to the MSDN help for the valious properties, or do what i did and pay around with the possibilities until you find the combination you like.
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
|
|
|
|
|
Thx
Now I work with the png format and it works fine.
New screeni at www.axamit.at (3MB)
lg ifoko
|
|
|
|
|
Hi
I want to develop an Intelligent Agent in .NET environment. I want to know that is there any support for Agent Technology in .NET like Agelets in Java? If not. Then What can be its possible solution? I am not talking about the user interface like MSAgent control.
Thanks for your time
Bye
|
|
|
|
|
What's your definition of "Agent Technology"?? Jade?
If so, then no, there isn't that I can find. But that won't stop you from writing one anyway.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yes, something like JADE. What other possiblities are there to solve such problem? If someone do not want to write JADE in .NET.
|
|
|
|
|
There are none that I know of. You'd have to write your own "JADE" library for .NET.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Issue/Requirements:
1. Use an SQL database to store text and MS Word documents
Data Source: Desktop
Initial Catalog (Database Name): BLOB
Table Name: tblBLOB
'Maybe some other columns will be added for later use.
Columns: BLOBID, BLOBName, BLOBDescription, BLOBDocument
2. Use Microsoft Visual Basic .NET to retrieve the information/documents
From Name: Form1.vb
Text Boxes: txtBLOBID, BLOBName, BLOBDescription
Picture Box: BLOBDocument
In the past I used MS Access and its internal forms to display the OLE Objects (MS Word documents) embeded (linked) into the table. However, I would like to start using an SQL Database and use an application to retrieve the BLOB
3. Functionality of the .NET form.
I would like to use the form to (1) retrieve and display a picture of the MS Document. (2) Search the SQL database for documents based on the BLOBDescription and or other fields. (3) Add new documents into the tblBlob. (4) Have basic database functions: NEXT, PREVIOUS, ADD, DELETE buttons.
i Have a majority of this complete (ie, the SQL database, The .NET form, but I just can't get the two to work together to insert a new document, and or view a new document.:->
Completely lost
John Rodriguez
Thank you all for your knowledge and help.
|
|
|
|
|
It's likely that the picturebox control is NOT going to render the word document like the Access Ole contro did. PictureBoxes understand graphics images, not ole documents. You will probably have to use word interop or something similar to render the document...
This post might get better expertise in the SQL/ADO forum...
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
This post might get more a
|
|
|
|
|
Thank you for the quick response.
What about using a unbound or bound object? Is there any work arounds? This is a link to what I've been attempting to put togther but no luck in following the code.
http://www.xtremevbtalk.com/showthread.php?t=239178&highlight=document+database
OR
http://www.xtremevbtalk.com/showthread.php?t=173268
John
|
|
|
|
|
Perhaps this [^]will help.
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
|
|
|
|
|
I try to run my C# application from a network drive and I get a Security Exception saying: "Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
Why does this happen? what should I do?
|
|
|
|