|
Hi,
I'm writing a web service with C#. I'm using VS.NET 2005 but I can't understand the way VS.NET create a web service (EX: I can't find the .wsdl file).
Can you explain it?
Thanks,
Hung.
Hung
|
|
|
|
|
|
Hi,
I am working on a web application in ASP.net & C# .For one of the utilities on my site, i need to use an available VC++ project.
This VC++ project produces an exe as its output.
I tried changing the output type of the VC++ project to .dll, but it doesn't help and after this, the project itself stops working.
Can someone please tell me as to how to use this VC++ project into my web application?
Thanks.
|
|
|
|
|
There're some very big issues involved here. If your VC++ project produces an exe, it is either a Windows or Console application project. So look bellow. This would work with VS2008, I don't remember how to do it using older versions.
1.- [Easiest] Is the VC++ project a managed project? Go to project properties and take a look under "Common Properties", if this tab works. Allows you to change "Targeted Framework", add references or so. It is a managed project. Solution: Just changed your project output type: Go to "Configuration Properties" > "General" > "Configuration Type" and change it to "Dynamic Library (.dll)". And just try placing the reference in your web.config, it should work. Down side. Global funcions and not managed types are not going to work for you ASP.NET site. All types you'd like to use must be marked as "__gc" or "__value". Take a look to this MSDN link > ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.en/dv_vclang/html/63b1e7ab-d1c8-4582-aa89-21bfddf694a9.htm
2.- [Hardest] Your project is a native one. Solution: First, change the project type, same as above (not mandatory, exe also can export functions). You'll have to make sure you're exporting the funcions you'd like to use from managed code. To see exported functions use "dumpbin.exe /EXPORTS <exe or="" dll="" file="">" from VS command prompt. Then you'll have to create a "wrapper" managed library to access to unmanaged, see this one to use native functions from managed code > ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.en/fxref_mscorlib/html/36830e35-7f2e-b1fa-87ca-144346051059.htm . Down side, most web hostings won't allow you to access to native code, or at lest no more than .NET native libraries or Windows API.
Hope it'll help
|
|
|
|
|
Hi
how can i check whether a screen saver is running or not.
Shajeel
|
|
|
|
|
tip #1: use google :>
tip #2: http://www.neowin.net/forum/lofiversion/index.php/t298659.html
|
|
|
|
|
Distortation/flickering occur while Open one form & Close another in c#(Windows)
On some Event(e.g Button Click) on Form1
Form2 f=new Form2(ref newDataSet);
f.show();
Form1.close();
i'm also passing some DataSet,Variable to the constructor of Form2
Sushil
-- modified at 5:41 Wednesday 5th April, 2006
|
|
|
|
|
hi everyone,
Here is my question:
In a WebForm we have taken two dropdownlists say dropdownlist1 and dropdownlist2.In the drop down list1 there is(jpeg image,textdocument) attached to it.
We have taken one folder(folder name temp) on the desktop.This folder contains(jpeg image1,textdocument1,jpegimage2,textdocument2 ).
now my question is on the dropdownlist1 when i click on jpegimage the file which is there on the desktop those two jpeg images i.e,image1 and image2 should be displayed on the dropdownlist2.
plz give me code for this program
thanku,
byeee
murali
|
|
|
|
|
Do your own homework
Ed
|
|
|
|
|
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.2
|
|
|
|
|
I have a standard C library file : "abc.dll". Now I want to reuse it with C# (VS.NET 2005). How can I do this?
Thanks,
Hung.
Hung
|
|
|
|
|
|
You must use InteropServices...
<br />
using System.Runtime.InteropServices<br />
then DllImport attribute
<br />
[DllImport("User32.dll")]<br />
public static extern int MessageBox(int h, string m, string c, int type);<br />
Then you are avaible to use MessageBox function
all code will be locking such the following:
<br />
using System;<br />
using System.Runtime.InteropServices;<br />
class MainClass <br />
{<br />
[DllImport("User32.dll")]<br />
public static extern int MessageBox(int h, string m, string c, int type);<br />
<br />
static int Main() <br />
{<br />
string myString; <br />
Console.Write("Enter your message: ");<br />
myString = Console.ReadLine();<br />
return MessageBox(0, myString, "My Message Box", 0);<br />
}<br />
}<br />
|
|
|
|
|
Thanks!
But my "abc.dll" file is not registered in Windows, and I don't want to register it! Do you have other ideas?
Hung
|
|
|
|
|
Put it into the same directory where your .NET executable is.
Best regards
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
Can you explain more details!!
I tried to add reference to standard C .dll file but VS.NET does not allow me to do.
Thanks,
Hung
|
|
|
|
|
i've created my c# application and now i want to setup file for it. The problem i'm facing is that my application requires some actions to be performed during setup such as:
copy E:\lib\myodbc3S.lib E:\\Windows\System32
copy E:\lib\myodbc3.dll E:\\Windows\System32
copy E:\lib\myodbc3.lib E:\\Windows\System32
copy E:\bin\myodbc3i.exe E:\\Windows\System32
copy E:\bin\myodbc3m.exe E:\\Windows\System32
copy E:\bin\myodbc3c.exe E:\\Windows\System32
copy E:\doc\*.hlp E:\\Windows\System32
and afyer this call a the regsvr32 command. How do I do this? I read something about an insatller class or something but i couldn't understand.
|
|
|
|
|
Hello,
I have problem with updating my form after I've executed an update or insert query.
How can I refresh my windows form in c#.
Thx
wistiti 5
|
|
|
|
|
no need to refresh the page to get updated.
for example:
f1() : write a function to display all the information on the page
f2(): write a separate function for doing modification and updating the database.
now u want the page to have the updated value to b displayed, for that wat u have to do is call the f1() process again..
sathy
|
|
|
|
|
Hi,
I have a server database and multiple client databases.
We need to update client databases everytime server database is updated.
And we need to do it using .Net i.e through the application server.
We intend to use ftp for file transfer and windows services to schedule it.
We have a batch file(dos-script) which reads from the flat file and updates the local database.
I need some help regarding running the batch file from windows services(using C#).
Can you suggest any way to do it as i am completely clueless now....
Thanks in anticipation....
|
|
|
|
|
Process.Start("yourbatchfile.bat");
|
|
|
|
|
who can tell me, how I can export a pdf-file to a SharePoint documentlibrary with C#?
I create with MS-Access a lot of turnoverlists every month. These lists are to be exported in differently documentlibraries.
I have a textfile with all pdf-files with name from link, name of documentlibrary and name from pdf-file (delimiter = ; ):
http://localhost;VB1;Dokumente;b:\CustVB1200603.pdf;"customer.pdf".
With C# I read the textfile and then...?
-- modified at 3:49 Wednesday 5th April, 2006
|
|
|
|
|
I am using Microsoft Patterns and Practices Enterprise Library Data Access Block. I have called a function which returns an object of type IDataReader. It has only single row in it.
I am writing this code
IDataReader dr =db.ExecuteReader(cmd);
string CityName = dr.GetValue(0).ToString();
On running this code I am getting the exception as
InvalidOperationException: Invalid attempt to read when no data is present.]
System.Data.SqlClient.SqlDataReader.PrepareRecord(Int32 i)
System.Data.SqlClient.SqlDataReader.GetValue(Int32 i)
But when I add two lines of code in it which has nothing to do with the running code, I don't get any exception. The code is as
IDataReader dr =db.ExecuteReader(cmd);
if (dr.Read()==true)//yaha kuch gadbad hai
{
int mkio =0;
}
string CityName = dr.GetValue(0).ToString();
Why this problem is happening and why it is not occuring when i add code which has nothing to do with the results.
Thanks,
Sandy
|
|
|
|
|
|
When you first get an instance of IDataReader, its position is set before the first row. So any attempt to read a value will cause the error you saw.
The corrrect way to use a datareader with a single row is
if(dr.Read())<br />
{<br />
}
or for a datareader with multiple rows
while(dr.Read())<br />
{<br />
}
the reason you stopped getting the error, is because you inadvertantly added a Read() command
|
|
|
|