|
Hi,
I had a written a Windows dll in VC++ fours years back. I wasnt to use the dll and call its methods from
How do i call the methods in dll from my C# project. Do I need to write a COM dll to use it in my .Net solution. If yes, how ?
Please suggest me the way to go about it.
Thanks & Regards
Gagan
|
|
|
|
|
Member 2503963 wrote: Do I need to write a COM dll to use it in my .Net solution
No. You can just use p/invoke to call methods on your object, and you can define structs that mirror any structs used in the C++ code Check out www.pinvoke.net for lots of examples, which are all using Win32 APIs
Member 2503963 wrote: If yes, how ?
Use the wizard to create a dll, import your C++ code into it ( so, it's a C++ COM dll ), and then provide a COM interface to yuor methods.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I want to search the hashtable with one key... that key is present in hashtable or not.
eg.
durimg Page_load i have fill the hashtable...
hTable.Add(100,"Bala");
hTable.Add(105,"Mala");
hTable.Add(110,"Raja");
hTable.Add(115,"Kala");
hTable.Add(120,"Praba");
in button click
i will give the input from textbox 115, i need to search the hashtable with the key from textbox
and display the answer as key is : 115 value is kala like this...
|
|
|
|
|
Have you read the documentation? The Hastable class has a ContainsKey[^] method that is used to detect the presence of a particular key.
BTW, unless you are still working with .NET 1.x, you are better off using the generic Dictionary[^] class instead of a Hashtable. The generic Dictionary class allows you to specify exactly what data types the key and value should be, thus enforcing type safety in your data.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
guys i want to make a forum using ASP.NET
which also has the facility of sign in and register
and i want to create it by own
dont provide me any download links of source codes
if u hav any ideas jst tell me where shud i start from
|
|
|
|
|
Well, this is a pretty top level question. First of all, do you have a clear spec of the features you want. For example, do you want to support threaded messages ?
Then, you need to work out what skills you need - do you know how to use ASP.NET ? Do you know how to use SQL Server, or whatever DB you will use ?
You can use the built in login control, but I prefer to write my own, you just store a value in the session to tell you that a user is logged in, and check that value from a base class, to redirect people who are not.
The rest is pretty simple, you just need to work out a database format for messages, and the UI to display them.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello There
I'm using Microsoft visual studio 2005 to design an asp.net site but when i try to run it it shows no error except this annoying message "The page cannot be displayed" .
My latest activity was that i install smart ftp .
i have windows xp home edition.
i forgot to mention that when i upload my pages to the web site it works just fine.
Thanks alot
modified on Saturday, April 12, 2008 1:45 PM
|
|
|
|
|
Is this file based or IIS? Is it possible you need to run asp_regiis?
only two letters away from being an asset
|
|
|
|
|
I don't have IIS just the web developer .
|
|
|
|
|
You may probaby not have set the Start Page in the project.
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
Thanks for replying
but i don't need to set the start page because i'm pressing F5 to debug the page.
i tried also aspnet_regiis.exe and nothing happened .
this kind of problems is annoying
Thanks .
Asaad
|
|
|
|
|
the problem is:
you just double click on asp_regiis.exe
and its not truth way
you have to run this execute file with specific switch(-i)
so write below code in command prompt to install asp.net 2.0
asp_regiiis.exe -i
nobody help you...
you have to help you yourself
and this is success way.
|
|
|
|
|
Dear Mr. Mohsen
i'm not just double clicking on the icon
i wrote the command aspnet_regiis.exe -i in the command prompt and it installed the asp.net
but the problem is still there .
Thanks for you help.
|
|
|
|
|
open Firewall from Control Panel click Advcanced tab, under Network Connection Settings click button Settings, on displayed window select tab Services check checkbox Web Server(HTTP), apply changes and try to run your application.
I Love SQL
|
|
|
|
|
Hello there
Unfortunatelly nothing changed .
I'm gonna be crazy . Now each page i do i must upload it to the website to test it .
Thanks you.
|
|
|
|
|
In Internet Explorer, you can make this change in Tools -> Internet Options. In the Connections tab, click LAN Settings and then select Bypass proxy server for local addresses.
I Love T-SQL
|
|
|
|
|
i don't use any proxy . Unfortunatelly.
Thanks .
|
|
|
|
|
Does Ctrl+F5 work?
Did you try to create a new web-site? Does it work ok? Had you change something in sytem services? try to delete web.config and run you web site again. does windows appclication (windows.forms) debugging work?
--
"Success is simple. Do what's right, the right way, at the right time."
best regards,
tradakad
|
|
|
|
|
Hi There
Ctrl+F5 not working at all but i notice something yesterday .
When i press wether F5 of ctrl+F5 a notify icon appears near the clock "ASP.NET Development Server" Port 3444 for example but in the web browser the address is http://localhost:3441/Default.aspx
do you notice the change in ports number and if i change it manually it works . I don't know what is the cause of this change . Everytime the different between ports number is exactly tow of three digits .
This problem is happening with any Visual Studio 2005 website i do but with VS 2008 everything works so fine .
Thanks.
|
|
|
|
|
I guess it was happend after installing VS 2008? I can advise nothnig except reinstall VS 2005.. Sorry I dont see other way to solve it..
Good luck!
--
"Success is simple. Do what's right, the right way, at the right time."
best regards,
tradakad
|
|
|
|
|
Hello There
After days of searching i found the solution for this annoying problem.
I'm using ESET Total security and it has an option for IP Contnt Filtering i've just disable it and everything work so fine .
Thank you.
|
|
|
|
|
I have two site map: "common.sitemap, loginuser.sitemap", two master page:" common.master, loginuser.master",
in common.master, there is a Navigation control: TreeView
TreeView--- Sitemapdatasource---common.sitemap
in Loginuser.master, there is another Navigation control: TreeView
TreeView---sitemapdatasource---loginuser.sitemap
when user does not login, show common.master page
After user login , show loginuser.master page.
My problems :
how can I set Sitemapdatasource to bind different siteMap? Because I alway get two treeView with same sitemap.
If I use Membership Class to set user login function, How can set up redirect page ?
Thanks
G Nathan
|
|
|
|
|
TreeView.Visible might do the trick
tvCommon.Visible = true;
tvUser.Visible = false;
after a succesful login:
tvCommon.Visible = false;
tvUser.Visible = true;
|
|
|
|
|
Hi, all!
I have a question - how can I call a method from userControl if that method exist in the another userControl
example:
index.aspx contains leftcontrol.ascx and rightcontrol.ascx
leftcontol.ascx has SomeFunc(int val);
SomeFunc(int val)
{
dropDownListEx.Items.Clear();
OtherFunc();
}
how can I call SomeFunc(int val) from rightcontrol.ascx?
Thank you very much!
--
"Success is simple. Do what's right, the right way, at the right time."
best regards,
tradakad
modified on Tuesday, April 15, 2008 7:49 AM
|
|
|
|
|
tradakad wrote: how can I call SomeFunc(int val) from rightcontrol.ascx?
Make your method public .
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|