|
hi All,
I have one windows service which works with "system account".
In this I am trying to access the mapped drive(shared on n/w by some server).
Now here I got errors like access denied. So I tried following cases.
case 1:
I changed the service to start as an administrator.
My mapped N/W drive has full access to everyone.
I have specified UNC paths
result: Things worked.
case 2:
I changed the service to start as administrator account.
My mapped N/W drive which needs password and username which are different.
Here I have specified the credentials while mapping that N/W drive.
I have specified UNC paths
result: I was unable to access the shared drive.
My question is as I am running as admin, my service is running as admin , I have mapped N/W drive as admin and supplied needed credentials at the mapping time.
why my service is not capable for acesssing that drive?
NOTE: I have an idea of null credentials but I don't want nullaccess enabled for N/W share. so dont want to use that option.
vikram S
|
|
|
|
|
Hi,
in the app i'm writing i need to collect data from various sources,every hour.I want the user to be capable of consulting these data through graphs,and most of all, to consult all the data acquired up to now.So i need to load all the data at every app start.
Now,i would like to ask you about a good way to store and quickly load data.I mean,i know i can store data in a text file,but i'm concerned about how long it will take to load this huge archive text file after some years....
|
|
|
|
|
|
This is the a good point,actually the one i was looking for,but i had no idea cause i have few experience of that and so i asked to more expert people.
Sorry about this following silly question,but as i told i'm a newbie in that:can a database solve my problems?
Thanks for the reply,by the way!
|
|
|
|
|
Accius wrote: can a database solve my problems?
yes.
their whole reason for existing is to store large amounts of data in ways that make it easy to access and update that data.
|
|
|
|
|
OK.
Just a last question:how about the time to load the database,when it has grown a lot?Will it be better than the simple text file loading?
|
|
|
|
|
to "load" the database ?
you access a database records through SQL requests...
if the database get too huge, you can indexate some table columns that are used often to query data
|
|
|
|
|
you should only load the data that you actually need, when you need it. if you need to read everything into memory, then a database won't help you.
databases help organize data so you can get the relevant parts of the data when you need them, quickly.
|
|
|
|
|
Ok,again i thank you.
You helped me a lot
|
|
|
|
|
By the way...
Can i add database support in a dialog based application i've already written?
Or have i got to make a new application?
|
|
|
|
|
Do you want to use of Sql Server or Access you said every hour does data voluminous?
|
|
|
|
|
WhiteSky wrote: Sql Server or Access
why don't you propose Oracle also in your list ? oh, yeah, MS Centric.
but know that Access is not a database
|
|
|
|
|
But why I must suggest Oracle I preference use of Sql Server(products of Misrosoft)
|
|
|
|
|
i've been using both, but for very huge databases, MS SQL Server does strange things somethings (weird execution paths, way slow than oracle for same scheme...)
The problem of Oracle is the non friendly administration tools. MS produces good stuff for this ; but the main purpose behind that is the database, no ?
then my choice is done (i repeat, for huge databases !)
|
|
|
|
|
I have a tbl for COM application.
In the header file of the application - initInstance(),
CoInitializeEx(NULL,COINIT_MULTITHREADED); is called.
In the Dialog (normal MFC) creatinstance is called.
The classID is passed to the createinstance.
Then,
BOOL Ret = AfxConnectionAdvise(
<punksrc>,
DIID__IEvents ,
GetIDispatch(FALSE), //get the IDispatch assocaiated with Mainframe...
FALSE, //donod addref
&m_dwCookie);//cookie to break connection later...
}
But, while calling the above method, exception is trown in AfxConnectionAdvise.
Thanks
Thanks
Raji
|
|
|
|
|
RajiRaghu wrote: GetIDispatch(FALSE), //get the IDispatch assocaiated with Mainframe...
FALSE, //donod addref
&m_dwCookie);//cookie to break connection later...
}
Are you sure GetIDDispatch here is retunring non-NULL ?
|
|
|
|
|
m_pControl.CreateInstance("8fea0f92-1975-4a13-af9b-5666583843db");
m_pMonitor.CreateInstance("b4c8b90e-11c8-4f8b-81a0-a6bcb53d5c2a");
The first parameter of AfxConnectionAdvise - pUnkSrc is 0x00000000
pUnkSink - is not null.
- pUnkSink 0x0012fe34 IUnknown *
- [COleDispatchImpl] {...} COleDispatchImpl
- IDispatch {...} IDispatch
- IUnknown {...} IUnknown
- __vfptr 0x7c15957c const COleDispatchImpl::`vftable' *
[0] 0x7c2e5f80 COleDispatchImpl::QueryInterface(const _GUID &, void * *) *
[1] 0x7c2e5f40 COleDispatchImpl::AddRef(void) *
[2] 0x7c2e5f60 COleDispatchImpl::Release(void)
Thanks
Raji
|
|
|
|
|
RajiRaghu wrote: The first parameter of AfxConnectionAdvise - pUnkSrc is 0x00000000
That may be cause of exception.
|
|
|
|
|
The first parameter is from
m_pControl.CreateInstance("8fea0f92-1975-4a13-af9b-5666583843db");
m_pMonitor.CreateInstance("b4c8b90e-11c8-4f8b-81a0-a6bcb53d5c2a");
means that createInstance failed?
Please suggest altenatives..
Thanks
Raji
|
|
|
|
|
May be seeing complete relevent code can thorugh some light.
|
|
|
|
|
improrted the tlb file with the path. .tlh got created.
but in createinstance, HRESULT returns "Invalid Class String" is returned.
Is anything need to be registered? Is this is the problem with the application unaware of the tlb file?
Any clues please.
Thanks
Raji
|
|
|
|
|
RajiRaghu wrote: but in createinstance, HRESULT returns "Invalid Class String" is returned
This resons may come because of following reaosns,
1. Either you have not registered your component using regsvr32.
2. You are using wrong class id to instanciate object.
|
|
|
|
|
Created an application where the .tbl file is included.
The corresponding .dll is in the library path.
Did not register any .dll.
Thanks
Raji
|
|
|
|
|
From command line you need to use command regsvr32 "dllpath.dll", to register component. You will get registration succesful message box then.
|
|
|
|
|
Hi,
I am trying to broadcast a DHCP Message with unbound adapter (after ipconfig /release) on windows XP SP2.
When I try to send the message, I get the error 10065 (WSAEHOSTUNREACH).
I am trying to send the message using Microsoft Visual C++. I have tried using a RAW socket.
The Message is succesfully sent when an IP address is bound, but I receive 10065 when it is unbound (0.0.0.0).
I have also tried using a Java program, but I get the equivalent error: NoRouteToHostException.
I know it is possible to send such a message, since the Microsoft DHCP Client does it at "ipconfig /renew" after an "ipconfig /release".
Could anyone help me?
|
|
|
|