|
Dear all, iam at the end stage of my project. i am having lot of dll's like common dlls, shared dlls and group specific dlls. while building my solution i referenced all dlls with copy Locat=true; what happened is when depolyed my project using the setup i created separate folders for dlls types. but my Main GUI which refers these dlls takes localy copy of all to its bin folder. so i re referenced the dlls with copy local=false. but this gave me a error "Dll not found on the path = "path i refernced during runtime" in the depolyed machine.
Basically how you people create a setup environment like this. i have one more idea, like can i add the all paths(target directroy paths of (common,shared,group)) in Environment variable-Path. so that the CLR serachs the Environment paths and detect automatically. Please suggest me Thanks and Regards,
Srini
|
|
|
|
|
Hello
engsrini wrote: i am having lot of dll's like common dlls, shared dlls and group specific dlls
Well, the following quote is from MSDN
MSDN: At run time, components must be in one of two locations: in the output path of the project or the Global Assembly Cache (GAC).
MSDN: There are several ways to deploy an assembly into the global assembly cache:
Use an installer designed to work with the global assembly cache. This is the preferred option for installing assemblies into the global assembly cache
Revise MSDN for more details about the Global Assembly Cache.
Regards
|
|
|
|
|
Thanks for your reply,
First of all, GAC is used to share our assemblies. mainly if there is a need to share, version management then we have to go for GAC. also it requires Strong name. in my case it doesn't requires all these stuffs. I want to have the separate folders like Common,Shared and Group where the GUI will refer the dll. At the worst case i can go for GAC. any other options..
I saw one more thing. in the app.config file there is one tag called <probing> where we can specify the folders in which the CLR has to look out for assembly paths. anybody having idea on this.
Thanks and Regards,
Srini
|
|
|
|
|
Hello
engsrini wrote: in the app.config file there is one tag called where we can specify the folders in which the CLR has to look out for assembly
This is at design time, before compiling your applications. It doesn't work after compiling the application.
The only way that will achieve exactly what you want -that I know of, of course-, would be Reflection.
Using reflection means that you load your assembly in the code at runtime, create dynamic instances of your classes and use them just like if they were referenced to prior to compiling-well, almost like that;)-.
It'll be a very painful programming experience if you make every call to your dll's classes or methods through reflection. Trust me you won't forget it
Search MSDN for more details about Reflection.
Regards
|
|
|
|
|
hi every one
well its strange that I'm having a bit trouble updating the database after updating the dataset here. I'm using SQL server 2000.
sqlUpdateCommand1.Parameters["@BankID"].Value = bID = Convert.ToDecimal(textBoxBankID.Text);
sqlUpdateCommand1.Parameters["@BankName"].Value = textBoxBankName.Text;
sqlUpdateCommand1.Parameters["@Original_BankID"].Value =Convert.ToDecimal(orig_bankID);
sqlUpdateCommand1.Parameters["@Original_BankName"].Value = orig_bankName;
DataRow dr = accounts1.Bank.Rows[this.BindingContext[accounts1,"Bank"].Position];
dr["BankName"] = textBoxBankName.Text;
int n = sqlDataAdapter1.Update(accounts1,"Bank");
MessageBox.Show(n.ToString());
accounts1.AcceptChanges();
---------------------------
what happens is that it shows the update in that particular column untill its not closed. as soon as I close it and reopen it, it shwos the same ol previous value. I've dont the delete and insert part but this ones not working rt.
I'll be very thankful for ur help...
|
|
|
|
|
have you specified update command for ur dataadapter properly.
rahul
|
|
|
|
|
offcourse I made the dataadapter through the wizard
the code is
this.sqlUpdateCommand1.CommandText = "UPDATE Bank SET BankID = @BankID, BankName = @BankName WHERE (BankID = @Original_" + "BankID) AND (BankName = @Original_BankName); SELECT BankID, BankName FROM Bank W" +"HERE (BankID = @BankID)";
I used the two string variables orig_bankID and orig_bankName for keeping track of the previous(original) values of the record. These have the right values too. Where am I going wrong? I just can't understand.
Rocky
|
|
|
|
|
Windows application, Use the log4net, ConsoleAppender and RollingFileAppender to write the log information to Console and file for all classes. Now, there is a problem, how can display the log in the Windows form real time?
If there is a method to display the Console message just like we use the MS VS2005 debugging programs?
thanks!
|
|
|
|
|
Hello,
You can capture the output of the console application and redirect it to a textbox.
This is tricky, but should be doable and work for all kinds of applications.
Checkout the documentation on the Process class. This should provide you with information on how to redirect the output of a process.
WM.
What about weapons of mass-construction?
|
|
|
|
|
I'm trying to make Outlook addin that will add one button to outlook context menu---
(VB.net / C# .net (NO C++ .net))
first,
ActiveExplorerCBars = applicationObject.ActiveExplorer.CommandBars
then
cmdbar = ActiveExplorerCBars.Item("Context Menu") 'cmdbar is commandbar object "^getting error here"
control = cmdbar.Controls.Add(MsoControlType.msoControlButton)
With control
.Caption = "kedar"
.visible = true
..... other props
End With
but i'm gettin an error that the parameter "Context Menu" is incorrect @ cmdbar = Active......
"i have seen code working in vb but not in vb.net so keep that in mind and reply for vb.net"
i've refered -- http://www.outlookcode.com/codedetail.aspx?id=526
http://www.outlookcode.com/codedetail.aspx?id=314 ?
and similar codes but they'r not of any use to me,.....
I think "Context Menu" is not a valid parameter. But accordg to other resources i've cometo know that outlook has that Named menu.
I'd like if anyone can post a code to add the button to context menu.
thnx in advance
"You can do any thing you set to your mind" - theGhost_k8
|
|
|
|
|
Hi,
i need help...
i have a windows application, in which there a datagrid, and i have to show details in the grid in such a way, that when i click "Show Details"(which i can get as a row in the datagrid), the grid expands showingme more rows which get inserted where i clicked on show details...
Similarly, when i click 'Hide Details", the rows are not shown...
Does any one has code for this funnctionality of datagrid? plz do help me...
thanx,
Deepa
|
|
|
|
|
u can use dataview to bind ur datagrid,with dataview u can create diffrent view of data b filtering data from dataset.
rahul
|
|
|
|
|
Hi i did try but couldn't get anywhere...could you plz give example plzz
|
|
|
|
|
Hi,
I am working with sql server and ms access. I want to store .doc files. what is the standard way of keeping such files.
thanks !
jayasshc
|
|
|
|
|
csecharithjayasshc wrote: I am working with sql server and ms access. I want to store .doc files. what is the standard way of keeping such files.
I am guessing it would be with OLE Objects.
Probably something like this...
http://support.microsoft.com/?kbid=198466[^]
but in C#.
|
|
|
|
|
|
I have a video capturer card SDK.
in the .h file,
defined a class
all functions is in the class.
so i want to know how can i use the function?
because when i use the [Dllimport] to define the function in C#, when running, it doesn't work right,for an exception means "can not found the entrypoint in dll".
so i wondered the reason is the define of Class in dll file.
what can i do then?
the .h file is shown as below:
// AVEControl.h: interface for the AVEControl class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_AVECONTROL_H__4E171B4B_A11B_49F1_B41C_5F4A31B5CF08__INCLUDED_)
#define AFX_AVECONTROL_H__4E171B4B_A11B_49F1_B41C_5F4A31B5CF08__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifdef DEVICECONTROL_EXPORTS
#define DEVICECONTROL_API __declspec(dllexport)
#else
#define DEVICECONTROL_API __declspec(dllimport)
#endif
typedef HRESULT (*AVECALLBACK) (PBYTE pbData, LONG lDataLength);
#define E_DEVICE_NOT_READY 0xB0004001L
class DEVICECONTROL_API AVEControl
{
public:
HRESULT StartRecordWithoutPreview(HWND hWndCap, CString FileName, __int64 pFileLength, UINT pFileMessage, BOOL pShowSetting = TRUE);
HRESULT StartRecordWithPreview(HWND hWndCap, RECT rc, CString FileName, __int64 pFileLength, UINT pFileMessage, BOOL pShowSetting = TRUE);
HRESULT StartPreview(HWND hWndCap, RECT rc);
HRESULT SetVideoClippingWindow(HWND hwnd);
HRESULT SetCallback(AVECALLBACK Callback);
HRESULT GetVideoStatus(PUCHAR pSta);
HRESULT SetVideoPosition(LPRECT lpSRCRect, LPRECT lpDSTRect);
void GetCurrentImage(CString BmpFileFullName);
BOOL IsGraphRunning(void);
HRESULT StopGraph(void);
HRESULT ApplySettings(CString IniFileFullName);
HRESULT SetVideoProcAmp(long Property, long Value);
HRESULT GetVideoProcAmp(long Property, long* Value);
HRESULT GetEvent(long* EventCode, LONG_PTR* Param1, LONG_PTR* Param2, long msTimeout);
HRESULT SetNotifyWindow(OAHWND hwnd, long lMsg, LONG_PTR lInstanceData);
HRESULT InitDeviceControl(void);
AVEControl();
virtual ~AVEControl();
};
#endif // !defined(AFX_AVECONTROL_H__4E171B4B_A11B_49F1_B41C_5F4A31B5CF08__INCLUDED_)
|
|
|
|
|
See my post in the VB forum. Don't cross post, people consider it rude.
|
|
|
|
|
PaulC1972 wrote: Don't cross post, people consider it rude
Talking to yourself???
I guess the OP deleted their post.
|
|
|
|
|
I have to create a control really transparent, it is just a bounding box with handles.
I want show it insiede a panel and i want to see trought the background of the bounding box.
How?
|
|
|
|
|
|
I am at a cross roads with a program I am writing at the moment. I dont know which way to proceed. The information desired is held within File Types under Folder Options in My Computer. I have been tempted to pursue a registry programming approach however. Reading the article on shell extensions and the namespace I would love to be able to glean the information from this method. I have made some inroads into this by setting up the structure:
[StructLayout(LayoutKind.Sequential)]
public struct SHFILEINFO
{
public IntPtr hIcon;
public IntPtr iIcon;
public uint dwAttributes;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
public string szDisplayName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)]
public string szTypeName;
};
class ExtenManager
{
public const uint SHGFI_ICON = 0x000000100;
public const uint SHGFI_DISPLAYNAME = 0x000000200;
public const uint SHGFI_TYPENAME = 0x000000400;
public const uint SHGFI_ATTRIBUTES = 0x000000800;
public const uint SHGFI_ICONLOCATION = 0x000001000;
public const uint SHGFI_EXETYPE = 0x000002000;
public const uint SHGFI_SYSICONINDEX = 0x000004000;
public const uint SHGFI_LINKOVERLAY = 0x000008000;
public const uint SHGFI_SELECTED = 0x000010000;
public const uint SHGFI_ATTR_SPECIFIED = 0x000020000;
public const uint SHGFI_LARGEICON = 0x000000000;
public const uint SHGFI_SMALLICON = 0x000000001;
public const uint SHGFI_OPENICON = 0x000000002;
public const uint SHGFI_SHELLICONSIZE = 0x000000004;
public const uint SHGFI_PIDL = 0x000000008;
public const uint SHGFI_USEFILEATTRIBUTES = 0x000000010;
public const uint SHGFI_ADDOVERLAYS = 0x000000020;
public const uint SHGFI_OVERLAYINDEX = 0x000000040;
public const uint ILD_TRANSPARENT = 0x1;
[DllImport("shell32.dll")]
public static extern IntPtr SHGetFileInfo(string pszPath,
uint dwFileAttributes,
ref SHFILEINFO psfi,
uint cbSizeFileInfo,
uint uFlags);
}
And Calling it respectively with:
RunningApps.Items.Clear();
IntPtr hTypeInfo; // The Handle To The System FileType List
string fName; // 'the file name to get icon from
SHFILEINFO shinfo = new SHFILEINFO();
// Get All FileExtenstions
foreach (string file in System.IO.Directory.GetFiles("C:\\", "*.*"))
{
hTypeInfo = ExtenManager.SHGetFileInfo(file, 0, ref shinfo,
(uint)Marshal.SizeOF(shinfo), ExtenManager.SHGFI_TYPENAME | ExtenManager.SHGFI_USEFILEATTRIBUTES);
RunningApps.Items.Add(shinfo.szTypeName + " " + shinfo.szDisplayName);
}
Forgive the formatting, This give me the TypeName information which can be found in my computer but is all!. Is it possible to access all the File Extensions along with their information via a call to the shell32 API in My Computer / Folder Options / File Types. Could it be done through PIDL's and if so could someone please help me out!!
<div class="ForumSig"></div>
-- modified at 21:52 Sunday 23rd July, 2006
|
|
|
|
|
Hello People,
I've got an question. I'm working on a program and developed a function. The only thing I can't find the way to call it properly.
This is the function:
private void Stopcontact_Selected(string sender, System.Windows.Forms.PictureBox e)
{
string path = @"C:\C#\DOMO\niks.jpg";
if(licht.Checked)
{
path = @"C:\C#\DOMO\lamp_uit.jpg";
}
else if(gordijn.Checked)
{
path = @"C:\C#\DOMO\gordijn_open.jpg";
}
else
{
path = @"C:\C#\DOMO\niks.jpg";
}
e.Image = Image.FromFile (path);
}
There are multiple images that calls to this function. The hard part is, i can't find the way to send it back to the right image (the one that calls it).
Sorry for my crappy explenation but i'm not so good in english and formuling my questions.
Trick
|
|
|
|
|
What do you mean by 'call it properly' ?
The variable names make me think you started with an event and changed the types of the variables being passed in. That doesn't work. How are you trying to call this code ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
The way for me to call it is:
this.Stopcontact22.Click += new System.EventHandler(this.Stopcontact_Selected);
this don't work and i don't know the exact way to call it
|
|
|
|