|
Download the Merge Modules from BusinessObjects.com and include them in your setup/installer
Steve Jowett
-------------------------
It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)
|
|
|
|
|
Thanks,
But I have done that, included al the msn files, but it seems not to work
|
|
|
|
|
Hi I was wondering if anyone could give me any useful links to information on devoping applications for blackberry devices. Please help
Thanks
|
|
|
|
|
Google
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Hi All,
I'm Alessio.
I have a problem.
I've got a simple DLL written in VB6 to wrap Outlook 10 objects and to access an Exchange mailbox via MAPI.
I've referenced that DLL into my VB.NET project and, if it runs onto my pc, it works fine.
Once deployed onto the real server, I get "QueryInterface for interface CustomMAPI._cCustomMAPI failed" message when my .NET app tries to create a "CustomMAPI" object.
I built a vb6 setup package, then I've copied every single DLL, OCX & TLB file from "<my pc="">\support" folder to "<real server="">\windows\system32" folder, but it wasn't enough.
So, now, I don't know what else to do.
Please, help me.
Thanx in advance and excuse me for my english.
Alessio
|
|
|
|
|
Background:
I'm making a program to read from smartcards (and write to it)
Setup:
I have a form (with only a richtextbox on it)
And 1 or more threads (with the form thread it's 2 or more) (every smartcardreader attached to the pc get's a seperate thread)
Problem:
I need to be able to set a variable (boolean or other) across all the threads
I have a class witch handles the code for detecting a smartcard inserted or removed and raises an event (witch I catch in my form and thru delegates put something in the textbox)
But as long as my form is processing the card (reading from it and getting user input) the other cardreaders have to wait and can't raise the inserted event.
To this end I thought I only had to declare a public shared variable and set its value (so I could check that in the carddetection code and if needed wait) (I know this is so in java (from my collage days))
Everything I read says that when I declare the variable shared it should be changed in all thread's however when I implement this I find that every thread has his own instance of the variable and one thread can't change the other
Anyone know how I could set a variable across all threads (so from the form thread or from 1 of the created threats for the readers)?
Any help would be appriciated
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
Hi,
I'm afraid you are confusing a couple of things.
1.
the Shared keyword in VB.NET indicates a variable is a class member, rather than an
instance member, i.e. it exists once in the class, as opposed to once in every instance
of that class. The C# equivalent is "static". It has no relationship with threads.
2.
all variables by default are thread-agnostic, they exist once and are readable by all
threads.
3.
The one problem you may have is that variables could get "cached" in local variables
(that requires explicit code to do it) or in CPU registers, which could result in one
of the threads using stale data, i.e. not accessing the memory-based variable every time
your code seems to indicate.Example (in C#):
int a=1;
for (int i=0; i< 10; i++) {
int b=a+1;
}
although the code seems to access variable a over and over, maybe it gets executed
as a single read of a, and the value gets stored somewhere (in a register).
The compiler is allowed to do that under some circumstances, and there are ways to
prevent it. Good old C had the volatile keyword to prevent such optimisations;
C# has the same volatile keyword.
According to ms-help://MS.VSCC.v90/MS.msdnexpress.v90.en/dv_vsref/html/7c0efba1-45d9-4798-9051-9bdca3b899a6.htm VB.NET does not have an equivalent.
4.
There are language-specific keywords and thread synchronization primitives/classes
that may help you in achieving what you need. Have a look at SyncLock (that should do it),
and Interlocked class.
same.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Thank you for you'r reply I'll test this as soon as I can (due to some hardware problems my cardreaders seem to have stopped working)
Luc Pattyn wrote: 1.
the Shared keyword in VB.NET indicates a variable is a class member, rather than an
instance member, i.e. it exists once in the class, as opposed to once in every instance
of that class. The C# equivalent is "static". It has no relationship with threads.
I knew that but escaped me for a moment
Luc Pattyn wrote: 2.
all variables by default are thread-agnostic, they exist once and are readable by all
threads.
That has always been my experiance but now it doesn't seem to do that (never encounterd this problem before)
Luc Pattyn wrote: 3.
The one problem you may have is that variables could get "cached" in local variables
(that requires explicit code to do it) or in CPU registers, which could result in one
of the threads using stale data, i.e. not accessing the memory-based variable every time
your code seems to indicate.Example (in C#):
I don't have any code that would do this but I do have code that manages the memory and stores it's handle (is needed for accessing the smartcard readers)
Luc Pattyn wrote: 4.
There are language-specific keywords and thread synchronization primitives/classes
that may help you in achieving what you need. Have a look at SyncLock (that should do it),
and Interlocked class.
Did try the interlocked class before asking here but that didn't seem to solve the problem
Haven't tryed the synclock class so will do that next (as soon as I get my readers to work again)
I'll let you know how it goes
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
Hello dear friends,
I've one problem,
How can I determine if a particular file is open or close without opening
the file?
Say for example on my desktop I've one file named a.txt.
I want a function in which I pass the path of the file(..//a.txt) as
argument.
This function should return me true if file is open right now.
And the function should return false if the file is not open.
Thanks in advance.
ritz1234
|
|
|
|
|
The problem with that theory is you can't tell. Applications like Notepad only open the file long enough to read it into it's memory, then close the file. So, if the file really open?? Or does Notepad just have a copy of the contents of the file??
In either case, there is no function you can pass a filename to to find out if it's open. The only way to tell if the file is really open, and not just a copy like Notepad "opened" the file, would be to open every process in the system, enumerate its handles, then see if one of those handles is pointing the filename you want. There is no .NET way to do this. It would have to be done entirely in Win32 API function calls.
There is no way to tell if something loaded the file and closed it.
|
|
|
|
|
Thanks very much for the reply Dave,
Actually my application will works as shown below.
1)User download any file in some folder.
2)I'll use the ShellExecute API to open the file because that file might be of any type like .txt, .doc, .pdf etc I don't know which application to run for opening the currently downloaded file.
To use the solution in .NET I've to use System.Diagnostic class but I ve
2 more question if possible.I want to check this thing in VB.NET first.
1)
For all the Processes that are in the system how can enumerate the
handles that belogs to particualr process and How can we determine if the handle is of file and if the handle is of file how can we find the path of that file?
2)
How can I find out the handle of the file that are opened by my application? Because I think I've to compare these handles with all the currently opened handle in the system.
ritz1234
|
|
|
|
|
ritz1234 wrote: 1)
For all the Processes that are in the system how can enumerate the
handles that belogs to particualr process and How can we determine if the handle is of file and if the handle is of file how can we find the path of that file?
If this application is not run by an admin-level account, this won't work. Also, depending on the app doing the download, the file won't appear in the target folder until it's completely downloaded, THEN it's copied to the destination folder.
|
|
|
|
|
Hi friends..
I need to bind a checkbox to the first column of my datagrid..I use the following code to do so...I bind the datagrid through a dataset named "ldst" .The code is below
ldst = lobjclass1.TIC_GET_tTic_MM_ServiceType(0)
now i am getting the dataset with values in it..After this i am using the following code to bind checkbox within the datagrid(datagrid1)..
Dim tableStyle As New DataGridTableStyle
tableStyle.MappingName = "ldst"
Dim discontinuedCol As New DataGridBoolColumn
discontinuedCol.MappingName = "Discontinued"
discontinuedCol.HeaderText = ""
discontinuedCol.Width = 30
'turn off tristate
discontinuedCol.AllowNull = False
tableStyle.GridColumnStyles.Add(discontinuedCol)
'Step 2: AgentID
Dim column As New DataGridTextBoxColumn
column.MappingName = "AgentID"
column.HeaderText = "AgentID"
column.Width = 30
tableStyle.GridColumnStyles.Add(column)
'Step 2: Bank Name
column = New DataGridTextBoxColumn
column.MappingName = "Bank Name"
column.HeaderText = "Bank Name"
column.Width = 140
tableStyle.GridColumnStyles.Add(column)
'Step 2: Branch Name
column = New DataGridTextBoxColumn
column.MappingName = "Branch Name"
column.HeaderText = "Branch Name"
tableStyle.GridColumnStyles.Add(column)
'Step 2: City
column = New DataGridTextBoxColumn
column.MappingName = "City"
column.HeaderText = "City"
tableStyle.GridColumnStyles.Add(column)
'Step 2: Cheque / DD Date
column = New DataGridTextBoxColumn
column.MappingName = "Cheque / DD Date"
column.HeaderText = "Cheque / DD Date"
tableStyle.GridColumnStyles.Add(column)
'Step 2: Cheque / DD No
column = New DataGridTextBoxColumn
column.MappingName = "Cheque / DD No"
column.HeaderText = "Cheque / DD No"
tableStyle.GridColumnStyles.Add(column)
'Step 2: Pay Type
column = New DataGridTextBoxColumn
column.MappingName = "Pay Type"
column.HeaderText = "Pay Type"
tableStyle.GridColumnStyles.Add(column)
'Step 3: Add the tablestyle to the datagrid
Me.DataGrid1.TableStyles.Add(tableStyle)
Now where should i Pass the dataset return ("ldst.tables(0)") in the above code..?
Someone help in this regard...
Thanks...
Balaguru
|
|
|
|
|
Does your ldst.tables(0) has a boolean column inside it?
You set the datagrid's DataSource = ldst.tables(0).
|
|
|
|
|
No..
I dont have any boolean column inside it..Moreover in the below code
the table name has to be given in this tablestyle.MappingName.But since i have got the dataset being filled by a stored procedure..i couldn't do that..So what i should i specify in this tablestyle.MappingName..At present i have just given the dataset name in it i.e ldst which is not working..
tableStyle.MappingName = "ldst"
Moreover if i use datagrid1.datasource= ldst.tables(0)..I get the values but without the checkbox column which is of no need..
Kindly reply...
Balaguru
|
|
|
|
|
Try to see whether you can add the bool column in the dataset.table after you got it from the SP.
Be careful if you're going to save the dataset back to DB though, but since you got the dataset from a stored procedure I guess it's safe.
|
|
|
|
|
Dear Darkelv..
I am just displaying a checkbox in that datagrid's first column..I am not going to affect that table by any means with that checkbox..Ideally the checkbox itself is not shown..Then how could i think of making some changes in that table by means of that checkbox..?
Reply in this regard...
Thanks & Regards,
Balaguru
|
|
|
|
|
Well what I mean was just be careful that if you going to save the dataset back to DB, the extra column will probably cause problem. As you are not going to save the dataset back to DB, I think it should be fine.
|
|
|
|
|
Ok then..Wats the solution to bring that checkbox into that datagrid..?
Regards,
Balaguru
|
|
|
|
|
Well, since I do not know your system environment and what do you intend to do with the grid.
1. Have the column be added in the DataTable, by adding directly to Columns after you have gotten the result (I am not sure if you are able to add, kinda rusty with dataset).
2. Have the column be added in the DataTable, by using a Function to call the SP, then do a "Select [new bool column], * from Function(params)". I think you should be able to do that.
3. Transfer the data from DataTable to a collection of struct/class that has the additional bool property, and bind to the collection. May not fit your system design.
4. Beg the db owner?
|
|
|
|
|
hello all
i have to replace some string
search text is - <a href="/
replace text is - <a href="http://www.mysite.com/
and i am using below
str = Replace(str, "<a href="/","<a href="http://www.mysite.com/")
but i am unable to use escape sequence .
please help some
Rajeev Kr. Sharma
VRI Software Pvt.Ltd.
New Delhi India
HumOnline.com
Stay Connected
|
|
|
|
|
AS you didn't tell us the error, I have to guess and assume it's because you have a " in your string, and need to use \" instead.
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 )
|
|
|
|
|
please type my code in you application then you will get my problem.
actualy " comes im my string so it creating problem in string building
Rajeev Kr. Sharma
VRI Software Pvt.Ltd.
New Delhi India
HumOnline.com
Stay Connected
|
|
|
|
|
VB doesn't understand C-style escapes. Additionally, you escaped the string delimiters, not the quotes inside the string. Double quotes must be paired up to be escaped in VB, so your statement would look like:
str = Replace(str, "<a href="">
<div class="ForumSig"> <small>
<a href="http:
<br>
<font color="Blue">Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic<br /> 2006, 2007, 2008</font>
</br>
</div></a>
|
|
|
|
|
Try using double quoutes like so:
str = Replace(str,"<a href=""/", "<a href=""http://www.mysite.com/")
Notice href=""/ as the critical part in your problem. It would appear that you are not escaping the double qoute.
I hope this helps...
|
|
|
|