|
i decompiled the dll files to get my backend files but still i didnt hav ethe solution files.i m not able to send mails as it says .....dll missing n all
suggest to solve the problem.
|
|
|
|
|
Create a blank solution, drop the codez in there and compile.
What dll is it whining about? Can you post the exact message?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
i created new projects the pasted the code from other files its stills says dll is missing,
|
|
|
|
|
It'll say more than that, please copy/paste the message here.
It's either a missing reference (are you sure you are decompiling "your own code"?), or something else. Prolly the first one.
--edit
I see you opened a new question.
System.Web.UI.WebControls[^]
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public class brain : Page, IRequiresSessionState
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected HttpApplication ApplicationInstance
{
get
{
return this.Context.ApplicationInstance;
}
}
protected DefaultProfile Profile
{
get
{
return (DefaultProfile)this.Context.Profile;
}
}
}
error:Error 1 The type or namespace name 'IRequiresSessionState' could not be found (are you missing a using directive or an assembly reference?)
|
|
|
|
|
Same as the answer to your message above.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
|
System.Web.SessionState.IRequiresSessionState[^]
when i added above line shows error cannot use namespace cannot directly contains members
|
|
|
|
|
Don't include the interface-name when importing.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
It is not a simple matter to decompile a DLL into its source code. Also, the problem you describe is somewhat unclear: please provide exact details of what your code is doing and the text of any error messages you see.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Scenario: I have an application in C# with an application.manifest file.
This file controls the user privilage level.
I have it set to administrator.
This is because on windows vista and 7 machines my program wants elevated rights.
This works fine except it prompts the user every time. I would like it not to ask the user to elevate privilages. How can i do this.
|
|
|
|
|
If your application requires elevated privileges and the user is on windows 7 with UAC enabled then you really can't get around it.
Even builtin operating system functions prompt you when it needs elevated access. Even if you are logged in with administrative rights it will prompt you to run the process.
This can only be changed by UAC settings either local policy or domain policy, however that opens a security risk to the machine, also if you disable UAC and the user does not have the proper privileges then you are looking at exceptions occuring from not having the correct access. Unless of course they right click and choose "run as administrator".
|
|
|
|
|
Member 8231963 wrote:
This is because on windows vista and 7 machines my program wants elevated rights.
You could always re-examine the reason why it needs elevated rights.
|
|
|
|
|
Hi,
Could anyone explain me the difference between interface and class variable.
E.g.:
ISomething ivar; //interface variable
CSomething cvar; //class variable
or
IList<MyClass> var1;
List<MyClass> var2;
I am so confused the difference among them.
Thanks in advance!
modified 21-Jul-12 9:08am.
|
|
|
|
|
Using an interface makes it simpler to use multiple varying class instances that implement an interface without the need for extra coding as the interface defines properties, methods and events that must be accessible.
|
|
|
|
|
Technically, there is little to no difference, you would need to instantiate both these variables.
However, by defining var1 as an interface type, you have left the actual definition open for later, giving additional flexibility.
Based on some options, you could switch between different types at runtime when using an IList .
For e.g.
if (flag)
{
var1 = new List<MyClass>();
}
else
{
var 1 = new MyOwnList<MyClass>();
}
|
|
|
|
|
I want to block data copy from pen drive to computer and computer to pen drive using c#
|
|
|
|
|
|
haldin wrote: I want to block data copy from pen drive to computer and computer to pen drive using c#
Short answer; Impossible. Any other questions?
Long answer; as long as I have the pen-drive and access as root to a Linux-machine, I can read the thing bit by bit. Any authentication-scheme loaded into memory, is loaded in my machine, in my memory - where I can manipulate it to my liking.
Perhaps you best explain the type of "secret" that you want to distribute using the pen-drive. Depending on your requirements, you can use something like TrueCrypt to "mount" an encrypted file on that pen-drive as if it were a real drive; that's the simplest way of keeping your stuff on a USB stick private.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
i'm new in C#, i converted some code from my previous project and i have an error here.
i've put arrows between the code, i believe AppBarSettings type is APPBARDATA, but why it's still error?
TBAppBar class below,
public class TBAppBar
{
[DllImport("shell32", EntryPoint = "SHAppBarMessage", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
private static extern int GetAppBarMessage(int dwMessage, ref APPBARDATA pData);
[DllImport("shell32", EntryPoint = "SHAppBarMessage", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
private static extern int SetAppBarMessage(int dwMessage, ref APPBARDATA pData);
private struct APPBARDATA
{
public int cbSize;
public int hwnd;
public int uCallbackMessage;
public int uEdge;
public Rectangle rc;
public int lParam;
}
private const Int32 ABM_GETSTATE = 0x4;
private const Int32 ABM_GETTASKBARPOS = 0x5;
private const Int32 ABM_SETSTATE = 0xa;
private const Int32 ABS_AUTOHIDE = 0x1;
private const Int32 ABS_ALWAYSONTOP = 0x2;
private bool TBAppBAutoHide;
private bool TBAppBarAlwaysOnTop;
public TBAppBar()
{
this.GetState();
}
private void GetState()
{
APPBARDATA AppBarSetting = new APPBARDATA();
AppBarSetting.cbSize = Marshal.SizeOf(AppBarSetting);
---> Int32 AppBarState = GetAppBarMessage(ABM_GETSTATE, AppBarSetting); <---
switch (AppBarState)
{
case 0:
TBAppBAutoHide = false;
TBAppBarAlwaysOnTop = false;
break;
case ABS_ALWAYSONTOP:
TBAppBAutoHide = false;
TBAppBarAlwaysOnTop = true;
break;
default:
TBAppBAutoHide = true;
break;
}
}
private void SetState()
{
APPBARDATA AppBarSetting = new APPBARDATA();
AppBarSetting.cbSize = Marshal.SizeOf(AppBarSetting);
if (this.AutoHide)
{
AppBarSetting.lParam = ABS_AUTOHIDE;
}
if (this.AlwaysOnTop)
{
AppBarSetting.lParam = AppBarSetting.lParam | ABS_ALWAYSONTOP;
}
SetAppBarMessage(ABM_SETSTATE, AppBarSetting);
}
public bool AutoHide
{
get { return TBAppBAutoHide; }
set
{
TBAppBAutoHide = value;
this.SetState();
}
}
public bool AlwaysOnTop
{
get { return TBAppBarAlwaysOnTop; }
set
{
TBAppBarAlwaysOnTop = value;
this.SetState();
}
}
}
|
|
|
|
|
Midnight Ahri wrote: error here.
Are we supposed to guess what the error is?
Probably should be: Int32 AppBarState = GetAppBarMessage(ABM_GETSTATE, ref AppBarSetting);
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
modified 21-Jul-12 0:11am.
|
|
|
|
|
well, it works sweetly.
i thought using Option Strict ON will make it easy to convert to C#.
but even C# is more strict than VB.Net.
thank you very much, i've got to learn more about C#.
|
|
|
|
|
Good guess!
|
|
|
|
|
I need to access multiple accounts on a website, and have them all open at the same time. I assume I need to do this using threads. Furthermore later while running my program I need to be able to pick and choose which thread I am accessing to send or receive information from the site. I wish to use the same form while doing so.
How would I go about doing the above and can someone point me to a good example.
I appreciate any help,
Thanks in advance,
Michael
|
|
|
|
|
You probably need a form similar to most modern web browsers, where it has multiple tabs each accessing different accounts. You need to look at the System.Windows.Forms.WebBrowser [^] class and/or the System.Net [^] namespace for helper classes, especially HttpWebRequest [^] and HttpWebResponse [^]. As far as multi-threading goes you can find lots of samples via Google.
One of these days I'm going to think of a really clever signature.
|
|
|
|