473,394 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Determining if object is run in web or win32

Is there a way that you can tell if an object is run under a web or a win32
environment? I have an object ( Data Access Object) that uses the ASP.NET
cache. I have also implemented unit testing into the application (using
NUnit). These unit tests call the application which call the Data Access
Object which uses the cache. I want to be able to say, if this is run under
the win32 environment, dont use the cache. I guess I could check to see if
the cache object is null, but was just curious if there was another way
around that. Thanks in advance!

Nov 17 '05 #1
2 1110
You could check to see if the current context is null, but checking for the
existence of the cache as you mentioned seems just as simple.

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
"WebDevHokie" <mw******@rkeng.com> wrote in message
news:uT**************@TK2MSFTNGP11.phx.gbl...
Is there a way that you can tell if an object is run under a web or a win32 environment? I have an object ( Data Access Object) that uses the ASP.NET
cache. I have also implemented unit testing into the application (using
NUnit). These unit tests call the application which call the Data Access
Object which uses the cache. I want to be able to say, if this is run under the win32 environment, dont use the cache. I guess I could check to see if the cache object is null, but was just curious if there was another way
around that. Thanks in advance!

Nov 17 '05 #2
Ben
Determine from the process name see Process

"WebDevHokie" <mw******@rkeng.com> wrote in message
news:uT**************@TK2MSFTNGP11.phx.gbl...
Is there a way that you can tell if an object is run under a web or a win32 environment? I have an object ( Data Access Object) that uses the ASP.NET
cache. I have also implemented unit testing into the application (using
NUnit). These unit tests call the application which call the Data Access
Object which uses the cache. I want to be able to say, if this is run under the win32 environment, dont use the cache. I guess I could check to see if the cache object is null, but was just curious if there was another way
around that. Thanks in advance!

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: johny smith | last post by:
I am trying to figure out a way to print the address of what called a certain function once inside the function. I am assuming that this information is on the stack somewhere. But can someone...
2
by: Garrett | last post by:
Need any help in determining which groups have been given security access to a folder. Searched DirectoryServices to no avail... Any Help?
0
by: Patrick | last post by:
This is a C# post. I'm using VB.NET to create an add-in for the Google Sidebar, and have implemented the OnDetailsView method. NOTE : I've come across this same problem (error message) even in...
1
by: Stephanie Doherty | last post by:
Hello World, I am using Visual C++.Net Ver 6 and am hoping to find out how to determine the share name/UNC path that is associated with a specific drive letter. I've looked at the Drive Object...
9
by: Tim Frawley | last post by:
I have converted a VB6 application to VB.NET. The old application made extensive use of the Clipboard for copying an Image Name so that it could be pasted into the image capture app when the user...
2
by: mike2036 | last post by:
Does anyone know how I can determine the thread context in VB.NET? I have an elapsed timer event that I tie to the application context via SynchronizingObject. But code I run in the elapsed event...
0
by: fniles | last post by:
I created a CAB file for a 3rd party control (StockChartX) it using CABARC.exe that comes from Microsoft SDK. In the CAB file I included the StockChartX.ocx and StockChartX.INF. Then, I signed the...
9
by: bill | last post by:
I keep getting Object reference not set to an instance of an object error when trying to run my application on an installed client machine. I installed it on several others and it runs fine. I...
62
by: Laurent Deniau | last post by:
I just put the draft of my paper on the web: http://cern.ch/laurent.deniau/html/cos-oopsla07-draft.pdf I would be interested by any feedback from C programmers (with little OO knowledge) to...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.