|
Hi,
My requirement is my Windows application should check periodically for latest updates on some network or web location and users can download only changed files. I found ClickOnce is helpful for this but also I am not sure that it is designed for only sandbox execution/only for current user context or once downloaded, the application can be used by any user on that machine.
My application is going to be installed once on multiple machines on shared way so any user logs on should be able to run it.
How can I achieve this task?
Your ideas please.
Thanks.
|
|
|
|
|
hi
i need to split a string ATTATCGATGATATTATTGGTCTTATTTGT into each alphabet..
after splitting each index of the array should hold each alphabet eg. splitseq (0) = A, splitseq(1) = T n so on till the end of the sequence..
FYI its a gene sequence
pls reply urgently.....!!!!
|
|
|
|
|
So you're splitting it into a char array? There's a big hint in that sentence.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Don't cross-post. The daily CCC should be posted in the Lounge only.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hi poojapande;
You can use the ToCharArray method of the string class as shown in the code snippet.
Dim geneSeq As String = "ATTATCGATGATATTATTGGTCTTATTTGT"
Dim splitseq() As Char
splitseq = geneSeq.ToCharArray()
' Display the splitseq array
For Each ch As Char In splitseq
Console.WriteLine(ch)
Next
Fernando
|
|
|
|
|
Dear ALL,
How Can I Disable "Print" And "Save As" Options From a Sharepoint Server MOSS 2007 document library, so the users will be able only to view the document (Word, PDF,...) And no one will be able to Print Or Make a Save As for all the documents in this document library.
Regards,
|
|
|
|
|
I had installed the Intel fortran in my PC.
I had created the Test.F90 (fortran code)
SUBROUTINE GetNum (num, unit)
REAL*8 num,unit
unit = num+10
RETURN
END
I had created the c++ code in Microsft Visual studio 2005.
#include<iostream>
using namespace std;
extern "C"
{
__declspec(dllimport)
void _stdcall GetNum(double&,double&);
}
void main()
{
cout << "Hi MalliKARJUN" << endl;
double a,b;
a=10.0;
b=0.0;
GetNum(a,b);
}
I had added the fortan dependencis project with the above c++ project .
Above c++ project compile successfullly but it gives following errro while we build the code
error LNK2019: unresolved external symbol __imp__GetNum@8 referenced in function _main
Kindly help me out to resolve this issue
|
|
|
|
|
Hi,
I have the following warning when i build the setup project requiring 3.5 sp1.
Warning 1 Could not find prerequisite '.NET Framework 3.5 SP1' in path 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\'
I used instructions from http://download.microsoft.com/download/A/2/8/A2807F78-C861-4B66-9B31-9205C3F22252/VS2008SP1Readme.htm#General%20Issues[^] to copy net 3.5 sp1 to bootstrapper and modify product.xml as necessary.
The modifications were
<PackageFile Name="dotNetFX30\XPSEPSC-x86-en-US.exe" PublicKey="3082010A0282010100A2DB0A8DCFC2C1499BCDAA3A34AD23596BDB6CBE2122B794C8EAAEBFC6D526C232118BBCDA5D2CFB36561E152BAE8F0DDD14A36E284C7F163F41AC8D40B146880DD98194AD9706D05744765CEAF1FC0EE27F74A333CB74E5EFE361A17E03B745FFD53E12D5B0CA5E0DD07BF2B7130DFC606A2885758CB7ADBC85E817B490BEF516B6625DED11DF3AEE215B8BAF8073C345E3958977609BE7AD77C1378D33142F13DB62C9AE1AA94F9867ADD420393071E08D6746E2C61CF40D5074412FE805246A216B49B092C4B239C742A56D5C184AAB8FD78E833E780A47D8A4B28423C3E2F27B66B14A74BD26414B9C6114604E30C882F3D00B707CEE554D77D2085576810203010001" />
<PackageFile Name="dotNetFX30\XPSEPSC-amd64-en-US.exe" PublicKey="3082010A0282010100A2DB0A8DCFC2C1499BCDAA3A34AD23596BDB6CBE2122B794C8EAAEBFC6D526C232118BBCDA5D2CFB36561E152BAE8F0DDD14A36E284C7F163F41AC8D40B146880DD98194AD9706D05744765CEAF1FC0EE27F74A333CB74E5EFE361A17E03B745FFD53E12D5B0CA5E0DD07BF2B7130DFC606A2885758CB7ADBC85E817B490BEF516B6625DED11DF3AEE215B8BAF8073C345E3958977609BE7AD77C1378D33142F13DB62C9AE1AA94F9867ADD420393071E08D6746E2C61CF40D5074412FE805246A216B49B092C4B239C742A56D5C184AAB8FD78E833E780A47D8A4B28423C3E2F27B66B14A74BD26414B9C6114604E30C882F3D00B707CEE554D77D2085576810203010001" />
and added right after <PackageFiles CopyAllPackageFiles="IfNotHomeSite">
< PackageFile Name="TOOLS\clwireg.exe" />
< PackageFile Name="TOOLS\clwireg_x64.exe" />
< PackageFile Name="TOOLS\clwireg_ia64.exe" />
However i get that warning and i am unable to add net 3.5 sp1 to setup project. The solutions i found were to check again product.xml file and it's ok, restart, clean solution rebuild. Didn't work. Do you have some other suggestions?
Thank you
P.S. I hope this is the correct thread
|
|
|
|
|
Hi,
I have the following warning when i build the setup project requiring 3.5 sp1.
Warning 1 Could not find prerequisite '.NET Framework 3.5 SP1' in path 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\'
I used instructions from http://download.microsoft.com/download/A/2/8/A2807F78-C861-4B66-9B31-9205C3F22252/VS2008SP1Readme.htm#General%20Issues[^] to copy net 3.5 sp1 to bootstrapper and modify product.xml as necessary.
However i get that warning and i am unable to add net 3.5 sp1 to setup project. The solutions i found were to check again product.xml file and it's ok, restart, clean solution rebuild. Didn't work. Do you have some other suggestions?
Thank you
P.S. Deleted modifications to product.xml for a better view of post
|
|
|
|
|
Solved. In file product.xml i added
<PackageFile Name="TOOLS\clwireg.exe"/>
<PackageFile Name="TOOLS\clwireg_x64.exe"/>
<PackageFile Name="TOOLS\clwireg_ia64.exe"/>
which had a space before PackageFile which had to be removed for all 3 entries
|
|
|
|
|
I want to import contacts from windows address book in c# or vb.net. can anyone help me with that.
|
|
|
|
|
Hello!
I want to Delete Record from Data Grid if Check Box is checked, its a windows mobile application.
please help me.
Thanks.
sssssssss
|
|
|
|
|
the form has a field of MainMenu.
help me, how to paint the mainMenu, please.
|
|
|
|
|
You need to provide a lot more information than this. What form? Win Forms? What's the main menu?
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
I am working on AD RMS so can u plz tell me that how to get the machine certificate and
how to get the User License and How to get RAC(Rights Account Certificate)
PLease tell me that what is needed the first.
|
|
|
|
|
Can we use .Net Remoting if we have a COM client? That is, have a .net remoting object, a .net listener and a com client to request for the .net remote object?
|
|
|
|
|
Hi,
I can´t understand this:
help!
I´m developing application, and it´s using iText Library for generate PDF. The text input must be Rich formated. The pdf document generated, must be exactly equal to text. I´m parsed the text, for generated font name, color,size and then, the objects needed for iText ( it´s not support RTF to PDF conversions )
I´m using RichEdit Control, but the font size is not correct in comparission with the generated pdf. ( also are images objects ).
Then, I did a SIMPLE test with the DrawString method (gdi), ( same text, same font name and font size ), but they are not equal WIDTH. ( Richtext and drawtext ).
Conclusion: using a DrawString method generated the correct pdf (correct size).
The height and the size of each character are equal. The only diference is the char spacing
Why occurs this ?
I need resolve this problem with the fuc... Rich Edit Control.
Thanks!
PS: sorry for my poor english
modified on Wednesday, May 13, 2009 1:31 AM
|
|
|
|
|
According to msdn the IRunningObjectTableRegister method takes 4 parameters. See http://msdn.microsoft.com/en-us/library/ms680747(VS.85).aspx
However, the one in System.Runtime.InteropServices.ComTypes only takes 3. See http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.comtypes.irunningobjecttable.register.aspx .
Does anyone know if the return value of the .Net Register method is the dwRegister value required for the IRunningObjectTable.Revoke method? The explanation just says the return value is “An HRESULT value that indicates the success or failure of the operation.”
Thanks in advance.
|
|
|
|
|
Sorry, I just saw the "Community Content" bit at the end of the .net article saying the return value is the dwRegister value for the Revoke method.
I have a windows service which instantiates a class and would like to register this object in the ROT. I have found that testing this registry to the ROT works fine when it's done in a standalone exe but not within a windows service. I have read a case for why it doesn't work when in the Windows Service, that there is this flag ROTFLAGS_ALLOWANYCLIENT which you can pass to the Register method to allow any client to see it. Have I understood that the .net's IRunningObjectTable is the one that accepts this flag whereas the Ole32 one does not?
private int myRegisterActiveObject(object pUnk)
{
string sDelim = "!";
string sProgID = "MyNamespace.ClassName";
IBindCtx bc;
Ole32.CreateBindCtx(0, out bc);
IMoniker moniker;
Ole32.CreateItemMoniker(sDelim,sProgID, out moniker);
IRunningObjectTable rot;
bc.GetRunningObjectTable(out rot);
int register = rot.Register((ROTFLAGS_REGISTRATIONKEEPSALIVE | ROTFLAGS_ALLOWANYCLIENT), pUnk, moniker);
return register;
}
I get in the EventLog, "Service cannot be started. System.Runtime.InteropServices.COMException (0x80004015): The class is configured to run as a security id different from the caller (Exception from HRESULT: 0x80004015)..."
The Service is run under account type LocalSystem.
|
|
|
|
|
Notes I've read indicate that I also need to add registry below...
[HKEY_CLASSES_ROOT\APPID\myApp.exe]
"APPID"="{guid}"
But I don't know where i can find this AppId guid. Tried the assembly guid, the Service class's guid, the class guid and still I got the same security erro. I looked in dcomcnfg and my windows service didn't appear there (maybe b/c it failed to start).
|
|
|
|
|
I currently have a program which queries LDAP (Active Directory) and stores that data into a Multi-dimensional array.
I am trying to find another way to store the data that will allow me to manage easier.
My application:
- Runs in System Tray
- Starts at Windows Startup
- Retains Active Directory information in Memory for Quick Lookup
- Only Queries LDAP (AD) at application open
The application is used to quickly retrieve information, send emails, view group memberships.
I have just learned how to use a Dataset and Datatables and tried to store the data into that structure instead of an Array.
There are 18 pieces of data being stored for roughly 400 users so I guess that translates to about 7200 records.
I can store the data into the dataset/datatable, but I'm have a few issues:
Speed - Storing to the Datatable takes 23 seconds, versus 2 seconds for storing to an Array
Processor - While storing to the Datatable the processor is at 15-30%
Memory - Even after flushing the memory using a class I have my application is taking 6MB now instead of roughly 800k-1024k it was before.
My question is this, what is the best way to store the data in memory?
Am I doing anything wrong with the way I'm storing the data to a datatable?
Here is a picture of my application:
http:\\www.jkfweb.com\files\example.jpg
The code is in the following post.
modified on Tuesday, May 12, 2009 1:58 PM
|
|
|
|
|
Imports System.IO
Imports System.DirectoryServices
Imports System.Data
Module Module1
Public dsCSIDir As New DataSet("CSIDIR")
Public Users_Table As New DataTable
Public drUser As DataRow
Sub ImportUsers()
Dim direntry As New DirectoryEntry("LDAP://OU=CSI Users, DC=csileasing, DC=com")
Dim searcher As New DirectorySearcher(direntry)
Dim i As Integer = 0
Dim result As SearchResult
Console.WriteLine("Started Data Import at : " &amp; TimeOfDay)
Try
searcher.Filter = "(&amp;(objectClass=user)(samaccountname=*))"
searcher.ClientTimeout = TimeSpan.FromSeconds(5)
For Each result In searcher.FindAll
If result.Properties("samaccountname")(0) = Nothing Then
Continue For
End If
drUser = Users_Table.NewRow
drUser("index") = i
If result.Properties.Contains("company") Then
drUser("Company") = result.GetDirectoryEntry.Properties("company").Value
Else
Continue For
End If
drUser("LoginID") = result.GetDirectoryEntry.Properties("samaccountname").Value
drUser("DisplayName") = result.GetDirectoryEntry.Properties("cn").Value
If result.Properties.Contains("title") Then
drUser("Title") = result.GetDirectoryEntry.Properties("title").Value
End If
If result.Properties.Contains("telephoneNumber") Then
drUser("OfficePhone") = result.GetDirectoryEntry.Properties("telephoneNumber").Value
End If
If result.Properties.Contains("mobile") Then
drUser("CellPhone") = result.GetDirectoryEntry.Properties("mobile").Value
End If
If result.Properties.Contains("mail") Then
drUser("Email") = result.GetDirectoryEntry.Properties("mail").Value
End If
If result.Properties.Contains("streetAddress") Then
drUser("Street") = result.GetDirectoryEntry.Properties("streetAddress").Value
End If
If result.Properties.Contains("l") Then
drUser("City") = result.GetDirectoryEntry.Properties("l").Value
End If
If result.Properties.Contains("st") Then
drUser("State") = result.GetDirectoryEntry.Properties("st").Value
End If
If result.Properties.Contains("postalCode") Then
drUser("PostalCode") = result.GetDirectoryEntry.Properties("postalCode").Value
End If
If result.Properties.Contains("memberof") Then
Dim groups As DirectoryServices.ResultPropertyValueCollection = result.Properties.Item("MemberOf")
Dim groupslist As String = ""
Dim groupname As String = ""
For k As Int16 = 0 To groups.Count - 1
Dim fullname As String = result.Properties("memberof").Item(k).ToString
groupname = Left(Split(fullname, "=")(1), Len(Split(fullname, "=")(1)) - 3)
groupslist = groupslist &amp; groupname &amp; ","
Next
groupslist = Left(groupslist, Len(groupslist) - 1)
drUser("Groups") = groupslist
End If
If result.Properties.Contains("manager") Then
Dim managername As String() = Split(result.Properties("manager")(0), ",")
drUser("Manager") = Right(managername(0), Len(managername(0)) - 3)
End If
If result.Properties.Contains("sn") Then
drUser("FirstName") = result.GetDirectoryEntry.Properties("sn").Value
End If
If result.Properties.Contains("givenname") Then
drUser("LastName") = result.GetDirectoryEntry.Properties("givenname").Value
End If
If result.Properties.Contains("directReports") Then
Dim groups As DirectoryServices.ResultPropertyValueCollection = result.Properties.Item("directReports")
Dim groupslist As String = ""
Dim groupname As String = ""
For k As Int16 = 0 To groups.Count - 1
Dim fullname As String = result.Properties("directReports").Item(k).ToString
groupname = Left(Split(fullname, "=")(1), Len(Split(fullname, "=")(1)) - 3)
groupslist = groupslist &amp; groupname &amp; ","
Next
groupslist = Left(groupslist, Len(groupslist) - 1)
drUser("DirectReports") = groupslist
End If
If result.Properties.Contains("department") Then
drUser("Department") = result.GetDirectoryEntry.Properties("department").Value
End If
i += 1
Users_Table.Rows.Add(drUser)
Next
Catch ex As Exception
End Try
Users_Table.AcceptChanges()
dsCSIDir.Tables.Add(Users_Table)
End Sub
Public Sub CreateDataStructure()
Users_Table.TableName = "Users"
Console.WriteLine("Start of Create Columns at: " &amp; TimeOfDay)
Users_Table.Columns.Add("index", GetType(Integer))
Users_Table.Columns.Add("LoginID", GetType(String))
Users_Table.Columns.Add("FirstName", GetType(String))
Users_Table.Columns.Add("LastName", GetType(String))
Users_Table.Columns.Add("DisplayName", GetType(String))
Users_Table.Columns.Add("Title", GetType(String))
Users_Table.Columns.Add("Company", GetType(String))
Users_Table.Columns.Add("Email", GetType(String))
Users_Table.Columns.Add("OfficePhone", GetType(String))
Users_Table.Columns.Add("CellPhone", GetType(String))
Users_Table.Columns.Add("Street", GetType(String))
Users_Table.Columns.Add("City", GetType(String))
Users_Table.Columns.Add("State", GetType(String))
Users_Table.Columns.Add("PostalCode", GetType(String))
Users_Table.Columns.Add("Manager", GetType(String))
Users_Table.Columns.Add("Department", GetType(String))
Users_Table.Columns.Add("Groups", GetType(String))
Users_Table.Columns.Add("DirectReports", GetType(String))
Console.WriteLine("End of Create Columns at: " &amp; TimeOfDay)
End Sub
|
|
|
|
|
An array will work just fine for what youre trying to do. Datasets and Datatables will add a lot more overhead and processing then what is required for what you are trying to do. There isnt anything wrong with what you are trying to do but again datatables and especially datasets will take more resources.
Also the code you are using for storing into a datatable is correct.
On a side note: Why do you need to cache everyone in AD, wouldnt an on-demand query of a specific person be much more viable and only get everyone when needed?
|
|
|
|
|
Ian McCaul wrote: An array will work just fine for what youre trying to do. Datasets and Datatables will add a lot more overhead and processing then what is required for what you are trying to do. There isnt anything wrong with what you are trying to do but again datatables and especially datasets will take more resources.
Thanks for your response Ian.
What other structures can I store data in besides an Array and Dataset/Datatable?
I'm still learning quite a bit, and it may be that an Array is the best choice.
Thanks,
|
|
|
|
|
Well an array in .NET is a very general term. You have
List
ArrayList
Dictionary
HybridDictionary
etc.
There are many arrays and each have certain benfits depending on the size of the collection you are going to use and what functionality you would like with the collection. Google the 4 I gave you and specifically their generic versions. It should help steer you in the right direction.
|
|
|
|