edwin.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*##############################################################################
  2. HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. ############################################################################## */
  13. #ifndef __EDWIN_H__
  14. #define __EDWIN_H__
  15. typedef int (*PFN_THUNK_CLIENT)(void *data);
  16. #ifndef EDWIN_OFF_
  17. #ifdef _WIN32
  18. void *GetThunkingHandle();
  19. void ThunkToClientThread(void *hThunk, PFN_THUNK_CLIENT fn, void *data);
  20. int GetResourceData(const char *restype, int resid, void *&data, unsigned &len);
  21. #else
  22. inline void *GetThunkingHandle()
  23. {
  24. return 0;
  25. }
  26. inline void ThunkToClientThread(void *hThunk, PFN_THUNK_CLIENT fn, void *data)
  27. {
  28. fn(data);
  29. }
  30. inline int GetResourceData(const char *restype, int resid, void *&data, unsigned &len)
  31. {
  32. data=0;
  33. len=0;
  34. return 0;
  35. }
  36. #endif ////WIN32
  37. #endif //EDWIN_OFF_
  38. #endif //__EDWIN_H__