|
i wants to create property in a class at run time with different names and datatypes.. thanks
Muhammad Ismail Khan
SoftWare Developer CRM(Islamabad), Pakistan
|
|
|
|
|
Possible, but hardly practical. You'd have to use reflection to do this. I don't know of any examples on the web, nor do I have any myself.
Usually, if this comes up, I would have to question the design. Why do you think you have a need for this?
|
|
|
|
|
Dave Kreskowiak wrote: Why do you think you have a need for this?
Looking at the subject line, rum time? I'm so there after a long day. Captain Morgan with Dr. Pepper
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
I'm out of the Captain, but I've got a gallon of Jack Daniels on the kitchen counter!
|
|
|
|
|
Dave Kreskowiak wrote: got a gallon of Jack Daniels on the kitchen counter!
Whoohoo. That'll work as well.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
hai guys,
i am distributing a external winodow hook dll to the users system32 folder while installing my app. but after the installtion, when program is laucned, the dll loaded in vista, but no hooking. if restarted the pc only it works. but no problem in xp. it hooks and works fine after the installation.
whats wrong?
this is th innosetup code
Source: "D:\myproject\distribusion\xxxhook.dll"; DestDir: "{sys}"; Flags: ignoreversion
btw, it is a vb6 application.
|
|
|
|
|
My first question would be is the user running the code an Administrator?? You said you're using WIndows hooks, but not just anyone can use those functions.
|
|
|
|
|
Hai dav,
i am running in the admin account.
but here i dont think account is a concern in my openion.
hooks and permissions have no connection if i am correct.
the main think here, after restarting the machine, the hook works in vista.
but not imediatly after the installation.
D
|
|
|
|
|
afridy wrote: hooks and permissions have no connection if i am correct.
Depends on the hook. You never specified what hooks you're using, so it's impossible to say.
afridy wrote: the main think here, after restarting the machine, the hook works in vista.
but not imediatly after the installation.
Does the problem happen on a fresh machine that hasn't seen your app yet? Or is the problem occuring only when you reinstall the app or install a newer version of it? Is the setup replacing the .DLL immediately or is it queued for replacement when Windows starts. Is the .DLL still in use when your setup is run?
|
|
|
|
|
[quote]Depends on the hook. You never specified what hooks you're using, so it's impossible to say.[/quote]
Hai dave, sorry, yah it's a window hook that intercept messages and discard clicks from receiving by external windows when mouse move on them.
|
|
|
|
|
[quote]Does the problem happen on a fresh machine that hasn't seen your app yet? Or is the problem occuring only when you reinstall the app or install a newer version of it? Is the setup replacing the .DLL immediately or is it queued for replacement when Windows starts. Is the .DLL still in use when your setup is run?[/quote]
yah, this happens on the fresh machine.
the setup installes the dll on the first run and not at the restart since i have not specified sharefile or restartreplace in innosetup.
btw,how to check my dll is running or not while the program is running?
|
|
|
|
|
If this happens on a fresh install of the application, the .DLL isn't running since it's not installed yet.
You can't check to see if it's running or not. A .DLL is loaded into the process that uses it. If the application you launched that uses the .DLL is still running, then any .DLL's it used are still loaded and running to.
In that case, I don't know why your code doesn't work without a restart. Right now, I don't have to the time test and/or research it either.
|
|
|
|
|
thanks dave for the time you took to solve my issue. hope i could find some more tips here.
|
|
|
|
|
hi
i m running windows application in vb.net by pressing F5.
Then igot the error like
"Error while trying to run Project
Unable to start Debugging
The Binding handle is invalid"
plz help me
if i run any windows application from my system i m getting this error.
It is not for one project.for all the windows application projects
plz help me
vijay kumar D
|
|
|
|
|
All you've given us to work with is the error message you got. So, you'll have to read through these[^] Google results to find a solution.
|
|
|
|
|
hello everyone...
i encountered this error:
Creating an instance of the COM component with CLSID {00024500-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 8007000e.
in
Dim Excel_App As New Excel.Application
after i got any error when exporting excel programatical.. the last error i encountered was "out of memory to excute this program" then after that i cant run the application at all..
is there any solution to get rid this error? except in restarting the local machine...
please please help..
thanks in advance
jyn
|
|
|
|
|
Well, that memory error might have something to do with it. It appears you've run the machine out of memory. WHat are you doing that's allocating so much memory?
|
|
|
|
|
thanks for your reply Dave..
i just retrieving so much data from database..maybe my local machine cant handle it thats why it raised that error.. but when i put my app in pur server, i dont encounter that error.
jyn
|
|
|
|
|
How much RAM is in the server compared to the workstation??
|
|
|
|
|
Does anybody know if there is a way to Shutdown a computer without using CMD. I know that you can use
System.Diagnostics.Process.Start("ShutDown", "/s")
and C:\>shutdown but both of these use CMD where the user that is going to be using this program has CMD and batch disabled. If there isn't another way to do this then could you please tell me how to run a batch file as another user.
Thanks for your help in advance!
modified 8-Sep-21 21:01pm.
|
|
|
|
|
You're looking for ExitWindowsEx[^]. The user running the code, of course, has to have the permission to shutdown the machine though.
|
|
|
|
|
Ok I have figured out how to install an LPR port like so : (using the shell command of course)
Code:
Cscript %WINDIR%\System32\Printing_Admin_Scripts\en-US\Prnport.vbs -a -r CSE-ATLAB-BWQ -h at-cetus.ad.ufl.edu -o lpr -q CSE-ATLAB-BWQ
rundll32 printui.dll, PrintUIEntry /if /b "test_1" /f "%SYSTEMDRIVE%\7760.inf" /q /r "CSE-211-CLQ" /m "Xerox Phaser 7760GX PS" /z /u
Now the issue is when I do a check for it to be installed or already installed I do:
Code:
Cscript %WINDIR%\System32\Printing_Admin_Scripts\en-US\Prnport.vbs -l -r CSE-211-CLQ
The issue is that the above command shows all the ports, not just the one that I am looking for. and If I get that working, how on earth to I trap the output and
get a specific word that would show that it is installed out of:
Server name
Port name CSE-211-CLQ
Host address at-cetus.ad.ufl.edu
Protocol LPR
Queue cse-211-clq
Byte Count Disabled
SNMP Disabled
How do I accomplish this??
Also How do I use the shell commands in the background worker?
|
|
|
|
|
The easiest way would be to change the command line to pipe the output to a file, then read the file and process it.
Cscript %WINDIR%\System32\Printing_Admin_Scripts\en-US\Prnport.vbs -l -r CSE-211-CLQ > filepath
As for launching those commands, it doesn't matter it it's launched from a background thread or not. The process you launch will get it's own process space and it's own threads.
|
|
|
|
|
The problem is that the shell commands never get ran it seems. When I type it in the command prompt it works fine, but when I:
Shell("Cscript %WINDIR%\System32\Printing_Admin_Scripts\en-US\Prnport.vbs -a -r CSE-ATLAB-BWQ -h at-cetus.ad.ufl.edu -o lpr -q CSE-ATLAB-BWQ")
It never runs. Did I use the wrong command?
|
|
|
|
|
Look into the Process class and it's Start method.
|
|
|
|